bpGusar
bpGusar

Reputation: 127

How to migrate ejected React app to TypeScript?

I have ejected React project and me need integrate Typescript to him. How can I do this?

Upvotes: 1

Views: 635

Answers (1)

rasfuranku
rasfuranku

Reputation: 98

create-react-app already has support for Typescript, if you didn't use the flag --typescript when creating your app, you can just install some new dependencies and change the extensions of your files to ts or tsx to put it to work, the rest is basically configured on Webpack.

Dependencies to install: typescript, @types/react, @types/react-dom, @types/node.

You can find more information here: https://facebook.github.io/create-react-app/docs/adding-typescript

Upvotes: 1

Related Questions