Convert to TypeScript
TypeScript is getting more and more popular. Since we're using Flow it might be quite easy to convert to TypeScript and be more "developer friendly".
TypeScript support in CRA is still kind of minimal. Let's check if basePath gets supported.
@Gaya Did you use create-react-script to startup?
@Gaya Have you looked into how this would be done also? Just adding the different dependencies?
I followed their guide. There are some features I use in JavaScript like absolute imports which are not yet supported in Create React App + TypeScript, they're working on getting it supported though.
I am waiting until that is fixed.
https://facebook.github.io/create-react-app/docs/adding-typescript
@Gaya Oh right, looks quite easy then, I didn't realize. Have you used much typescript before?
@Scoombe Yes I have used it on another project. Still prefer Flow, but it is loosing the popularity contest and to keep up with the rest of the community I'd say using TypeScript will be preferable. It's not even that different though, so it should be too much of a task
Checked back on this one today since TS support has been improved. The feeling I get right now is that I am only trading in one technology for the other without any benefits other than: it's more popular to use. There are a few trade-offs when switching to Typescript.
- ESLint support is not great, which would take a lot of time to reconfigure
- Missing features like import / exporting types
- Feels just less "working", probably because the project is Flow type
It makes me wonder how much it's worth switching the Typescript at all, I have always preferred Flow type any way.
I am going to think this one over a bit more.