gothinkster / react-redux-realworld-example-app

Exemplary real world application built with React + Redux
https://react-redux.realworld.io
MIT License
5.55k stars 2.5k forks source link

Adding typescript tougher than expected #137

Open edPratt opened 5 years ago

edPratt commented 5 years ago

So I'm adding typescript to my clone of this repo for a side project, and I figured that since "this project uses create-react-app" that I could follow the very simple steps here to add typescript to an already existing app created with create-react-app, but it didn't "just work". Does anyone have any tips here? I then explored ejecting the app and manually adding typescript support through webpack etc. but that seems to be a bigger project than I'm willing to take on at the moment unless I know that there are no other options.

marko-hologram commented 4 years ago

I know this response is way way too late probably, but looking at the URL for CRA you provided, it says:

Note: this feature is available with react-scripts@2.1.0 and higher.

This project uses react-scripts 1.1.1. So the first step would be to at least update to 2.1.0 (or better yet 3.x since that's the latest one).

I'm sure this link below can help you, at least as a first step.

https://reactjs.org/blog/2018/10/01/create-react-app-v2.html#updating-a-project-to-create-react-app-20