Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to TypeScript #226

Open
Gaya opened this issue Jan 10, 2019 · 7 comments
Open

Convert to TypeScript #226

Gaya opened this issue Jan 10, 2019 · 7 comments
Labels
optimisation For a better development experience or better source output technical dept Issue arises because of old implementation

Comments

@Gaya
Copy link
Collaborator

Gaya commented Jan 10, 2019

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".

@Gaya Gaya added optimisation For a better development experience or better source output technical dept Issue arises because of old implementation labels Jan 10, 2019
@Gaya
Copy link
Collaborator Author

Gaya commented Jan 10, 2019

TypeScript support in CRA is still kind of minimal. Let's check if basePath gets supported.

@Scoombe
Copy link
Contributor

Scoombe commented Jan 25, 2019

@Gaya Did you use create-react-script to startup?

@Scoombe
Copy link
Contributor

Scoombe commented Jan 25, 2019

@Gaya Have you looked into how this would be done also? Just adding the different dependencies?

@Gaya
Copy link
Collaborator Author

Gaya commented Jan 25, 2019

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

@Scoombe
Copy link
Contributor

Scoombe commented Jan 25, 2019

@Gaya Oh right, looks quite easy then, I didn't realize. Have you used much typescript before?

@Gaya
Copy link
Collaborator Author

Gaya commented Jan 25, 2019

@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

@Gaya
Copy link
Collaborator Author

Gaya commented Apr 23, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimisation For a better development experience or better source output technical dept Issue arises because of old implementation
Projects
None yet
Development

No branches or pull requests

2 participants