🌐
Create React App
create-react-app.dev › docs › adding-typescript
Adding TypeScript | Create React App
Global installs of create-react-app are no longer supported. To add TypeScript to an existing Create React App project, first install it:
🌐
GitHub
github.com › wmonk › create-react-app-typescript
GitHub - wmonk/create-react-app-typescript: DEPRECATED: Create React apps using typescript with no build configuration.
January 26, 2019 - Create React apps (with Typescript) with no build configuration.
Starred by 3.7K users
Forked by 487 users
Languages   JavaScript 82.5% | Shell 9.4% | TypeScript 5.9% | HTML 1.7% | CSS 0.5% | JavaScript 82.5% | Shell 9.4% | TypeScript 5.9% | HTML 1.7% | CSS 0.5%
Discussions

Adding TypeScript to existing create-react-app app
I'm having difficulties adding TypeScript to an already existing create-react-app application. Previously I've always added it before starting the project, simply by create-react-app my-app --scripts- More on stackoverflow.com
🌐 stackoverflow.com
advice wanted: simple react typescript setup
I’ve really enjoyed using vite. I’ve got it setup in a Remix app, which might be more than you want, but it’s been a solid experience More on reddit.com
🌐 r/reactjs
30
7
February 18, 2023
what are the best practices for a react typescript project
The best advice I can give is regardless of what you do, maintain the single responsibility principle as best you can. Ie if you have business logic in the code, don’t make a single component/file do one thing if X, something else if Y. If that is the case go up one level and conditionally render. This will keep your code much more readable. More on reddit.com
🌐 r/reactjs
17
24
October 8, 2022
First React app made with Typescript
Senior dev here, I know this might seem long and harsh but what you've built is pretty solid and is overall really well written. Things I would bring up in a code review Stuff like this can be trouble because here you're returning type "movie" | "tv" | undefined and I'm not sure if you're prepared to handle that undefined so forcing yourself to be more explicit is better practice. I'm of the opinion that if you don't have strict mode on, then you're not really using TypeScript. For your Button props you're extending the wrong base. You should extend ButtonHTMLAttributes (ButtonHTMLAttributes comes from React). And type & disabled are already defined in there so you don't need to provide them. The way yours is I don't think will even technically allow you to pass an onClick to your button. Here's how I've coded my most recent custom button component. You might also note that you can't pass className to your inner button element from the outer one. I would recommend you support an override like className={`btn ${props.className ?? ""}`} Imo it's bad practice to take a children that isn't just type of React.ReactNode. If your children is anything else... just make it another prop. And you also have to be very cautious about inlining functional component definitions because this can break the hooks algorithm if you don't render it with JSX. If you're going to do this, you should rename children to be PascalCase (when you destructure it from props), and then call it as to not break the hooks algorithm. And on that note, it's taking in a function without a named argument where it's used... don't do that. Have it take in the argument { movie: ProcessedMovie } not just ProcessedMovie, that way when you pass MovieCard as the children to it here you can just do {MovieCard} because MovieCard is already a function. And on that note is Carousel ever called with anything other than MovieCard? Seems like you should just move MovieCard into the carousel component and call it MovieCardCarousel or just MovieCarousel. It's not like that component is generic at all seeing as it's already taking in movies rather than a generic items list. And if you need a generic carousel... Swiper is basically already providing that to you. EDIT: moved this one to the more important section because I think it is Plain SCSS files can be a bit hazardous as now you've got string references in className props that are hard-reliant on a style that's defined... somewhere. I would definitely say that SCSS modules are worth their pattern. Plus it helps you colocate styles with the rest of your component which is what React is already trying to do with JSX. This is more likely to protect you from forgetting to update the referenced name of your class if you change it in only one place. Things that are just not how I would do it I don't know why you put spaces around variables in interpolated strings. It just makes it look so much wider and imo it's ugly. Same thing with your props propName={ propValue } looks weird to me, no reason it can't be propName={propValue}. Oddly though, I actually like spaces when you're making an object, destructuring an object, or importing so... take that how you will. Maybe just get a linter/prettier to make these stylistic choices for you 🤷‍♂️ Multiple returns are ugly if you can avoid them imo, this function could have been something like this const placeholderImg = "https://www.nadraonline.com/wp-content/uploads/2019/08/nadrablog_placeholder.png"; const generateThumbnail = (thumbnail: string) => !thumbnail ? placeholderImg : POSTER_BASE_URL + thumbnail; I think Redux is overkill more often than it is not. I would heavily recommend Zustand as an alternative in almost any situation. If you have a component which is alone, e.g., button.tsx don't hide it away in src/components/button/button.tsx and then export it from src/components/button/index.ts. Just put it in src/components/button.tsx and then put it somewhere once you have another file associated with it (like tests or SCSS modules). More on reddit.com
🌐 r/reactjs
5
1
November 26, 2022
People also ask

What’s the fastest correct way to create a React + TypeScript app?
Use the Create React App TypeScript template. It sets up TypeScript, common type packages, and sensible defaults so you can start building immediately.
🌐
sencha.com
sencha.com › home › blog › how to create react app typescript?
How to Create a React App with TypeScript (2026 Setup Guide)
Can I mix JavaScript and TypeScript in the same React project?
Yes. Many teams migrate gradually by converting files from .js to .tsx over time, while keeping parts of the project in JavaScript until they are updated.
🌐
sencha.com
sencha.com › home › blog › how to create react app typescript?
How to Create a React App with TypeScript (2026 Setup Guide)
Should I start a new React project with TypeScript, or add it later?
If the project will grow in scope or team size, starting with TypeScript is usually easier than migrating later. Migration is possible but requires additional refactoring and cleanup.
🌐
sencha.com
sencha.com › home › blog › how to create react app typescript?
How to Create a React App with TypeScript (2026 Setup Guide)
🌐
Reddit
reddit.com › r/reactjs › advice wanted: simple react typescript setup
r/reactjs on Reddit: advice wanted: simple react typescript setup
February 18, 2023 -

I tried "create-react-app" with the typescript template but so far, I really dislike it. The react-scripts part is unclear and confusing to me.

What is your go to for setting up a react project?

I think I will try one of the following two steps next:

a) use nextjs (did a small website using RNW and with it, was an easy to use setup)

b) set up react without any helper scripts

All I need:

  • react app (spa is enough)

  • typescript

🌐
Built In
builtin.com › software-engineering-perspectives › create-react-app-typescript
Create React App and TypeScript: A Quick How-To | Built In
Type cmd + shift + p to open quick settings in VSCode, and look for “TypeScript: Select TypeScript version…”. Click that, and choose “Use Workspace Version.” · Hopefully now you are free of any errors, your code is compiling and you’re ...
🌐
TypeScript
typescriptlang.org › docs › handbook › react.html
TypeScript: Documentation - React
Today there are many frameworks which support TypeScript out of the box: Create React App - TS docs · Next.js - TS docs · Gatsby - TS Docs · All of these are great starting points. We use Gatsby with TypeScript for this website, so that can also be a useful reference implementation.
🌐
Rootstack
rootstack.com › en › blog › how-use-typescript-create-react-app
How to use TypeScript with Create React App | Rootstack
To get started, you need Node.js installed, basic knowledge of React and TypeScript, and a modern code editor. First, open your terminal window and go to the directory where you want to build your project. Then use create-react-app with --template typescript:
🌐
Sencha
sencha.com › home › blog › how to create react app typescript?
How to Create a React App with TypeScript (2026 Setup Guide)
March 6, 2026 - Learn how to create a React TypeScript app fast—setup commands, TypeScript config, typing patterns, and troubleshooting tips.
Find elsewhere
🌐
Create React App
create-react-app.dev › docs › getting-started
Getting Started | Create React App
To use our provided TypeScript template, append --template typescript to the creation command. npx create-react-app my-app --template typescript Copy
🌐
Educative
educative.io › answers › create-react-app-typescript
Create React App Typescript
Creating a React application using TypeScript combines the power of React's declarative UI framework with the type safety and productivity enhancements of TypeScript. We will develop a boiler code for a React app, using TypeScript files with ...
🌐
DigitalOcean
digitalocean.com › community › tutorials › using-create-react-app-v2-and-typescript
How To Use Typescript with Create React App | DigitalOcean
April 3, 2021 - This tutorial was verified with Node v15.13.0, npm v7.8.0, react-scripts v4.0.3, react v17.0.2, and typescript v4.2.3. First, open your terminal window and navigate to the directory you want to build your project in. Then, use create-react-app with the --template typescript flag:
🌐
freeCodeCamp
freecodecamp.org › news › using-typescript-in-react-apps
How to Use TypeScript in React Apps
September 11, 2024 - When it comes to React, besides ... ways to create a React app with TypeScript is to use CRA, running npx create-react-app my-app --template typescript....
🌐
Medium
medium.com › @vipinnation › a-beginners-guide-to-creating-a-react-app-with-typescript-35b046343dac
A Beginner’s Guide to Creating a React App with TypeScript | by Vipin Singh Inkiya | Medium
January 14, 2024 - Notice the use of `React.FC` for functional components and how PropTypes are replaced with TypeScript prop types. import React from ‘react’; interface AppProps { message: string; } const App: React.FC<AppProps> = ({ message }) => { return <div>{message}</div>; }; export default App; ... Visit `http://localhost:3000` in your browser to see your new React app in action. Congratulations! You’ve successfully created a React app with TypeScript.
🌐
Mattermost
mattermost.com › home › using react with typescript
Using React with TypeScript - Mattermost
Learn how to create a new TypeScript app with create-react-app and convert an existing create-react-app to TypeScript.
Published   May 5, 2022
🌐
SoluteLabs
solutelabs.com › blog › create-react-app-with-typescript
Create React App With TypeScript - A Complete Guide
June 7, 2023 - Herein, you are required to look for "TypeScript: Select TypeScript version…". Upon locating the command line, click on it and then choose to use the workspace version. You are now good to go. In such a case, npx employs a cached version of create react app.
Price   $
Address   A1-104, Palladium, Corporate Road, Prahlad Nagar, 380015, Ahmedabad
🌐
Funnel Garden
funnelgarden.com › create-react-app-typescript
create-react-app in TypeScript - Funnel Garden
Here’s how to quickly create a React app in TypeScript, assuming Node with npm is already installed: npm install -g create-react-app create-react-app app-name --scripts-version=react-scripts-ts This will create a […]
🌐
DhiWise
dhiwise.com › post › a-comprehensive-overview-how-to-create-react-app-typescript
An Essential Guide on How to Create React App Typescript?
September 5, 2024 - When working with TypeScript in a React project, it's essential to have a development server that supports hot module replacement and can transpile TypeScript to JavaScript on the fly. Create React App provides such a server out of the box.
🌐
Software Testing Help
softwaretestinghelp.com › home › javascript › how to use create react app with typescript
How to Use Create React App With TypeScript
April 1, 2025 - Create react app is basically a node package that we can simply install. The interesting part about this is that you can use it with TypeScript very easily by leveraging the use of npm or yarn depending on what your package manager preference is.
🌐
This Dot Labs
thisdot.co › blog › getting-started-with-react-and-typescript
Getting Started with React and TypeScript - This Dot Labs
February 14, 2023 - Use the following command to generate a new Typescript React App. ... After the tool has finished running, switch directories into my-app run the command npm start to spin up your development environment.
🌐
React Native
reactnative.dev › docs › typescript
Using TypeScript · React Native
February 20, 2026 - We recommend that you use the TypeScript compiler only for type checking. This is the default behavior of tsc for newly created applications. If you have existing TypeScript code being ported to React Native, there are one or two caveats to using Babel instead of TypeScript.