Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

296
Visualizações
Can create-react-app be used with TypeScript

Is it possible to use TypeScript with create-react-app? If so, how would you do it?

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

You can do it like this:

create-react-app my-app --scripts-version=react-scripts-ts

See https://github.com/wmonk/create-react-app-typescript

No ejecting required for this.

over 4 years ago · Santiago Trujillo Relatório

0

This is the way to go:

# update create-react-app first
npm update -g create-react-app 
create-react-app my-app --typescript

Create React App v2.1.0 now supports TypeScript, so you no longer need to eject or use the react-scripts-ts fork;

Or you can add TypeScript to the existing app:

yarn add typescript @types/node @types/react @types/react-dom @types/jest
# or
npm install --save typescript @types/node @types/react @types/react-dom @types/jest  

then rename .js files to .tsx files to start using TypeScript.

Note that a tsconfig.json will be created for you when you run the app. You will be able to edit tsconfig.json except for some options.

Credits:

[1] Vincent answer

[2] migrate create react app typescript post

over 4 years ago · Santiago Trujillo Relatório

0

Typescript is available out of the box now, in create-react-app version 2.1!

You can use it now, like this (as shown here): npx create-react-app@next app-name --scripts-version=2.0.6-next.c662dfb0 --typescript

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda