3

I have become very fond of React, but the pushback I've experienced when suggesting typescript is crazy.
I think this is the reason why so many enterprise apps are written in Angular. Type safety isn’t a crutch, it's a tool. Plus, interfaces are a dev time construct, and will not bloat the codebase since it doesn’t transpile into js.
But Ts also gives us a lot of other goodies that allow for cleaner design patterns and a better adoption of oop principals.
Also, generics/constructor types, whatever you wanna call it, are your friends. An Array<SomeEntity> or SomeEntity[] will give you peace of mind I’m so many scenarios.
Anyway, I have bitched enough.
Rant over.
Have a wonderful Christmas, everyone.
Ps. This isn’t aimed at anyone in particular, but a the react community as a collective. :)

Comments
  • 1
    I like react and I love typescript, and they work great together too.
  • 0
    Without TypeScript, I would have gode crazy by now.
  • 0
    It depends if you see strong types as a advantage or not. For example i have electron apps that squeeze out a lot of performance via platform bound code fragments like Observables, 60fps update cycle and native curser positions when i benchmarked the impact of typescript, the overhead introduced eliminated most of these fragments and made the the app 20% slower across all code, and this is a no-go for our apps.

    Another gray area is that you have to find devs with the skillset you use, even though this is more of a bussiness aspect it affects the development time.

    Last but not least, ever tried react and typescript without using webpack or browserify? Which is desirable for electron or nw. It is misserable hard to configure, your build pipeline has to do some crazy stuff in order to make it work at all. Once it works you better pray to richard stallman that nobody touches any taskrunner scripts.
Add Comment