Skip to content

Commit e12f810

Browse files
Simplify Setup page (#622)
* Simplify Setup page * Update starter kits section * Remove video tutorial
1 parent 9985de7 commit e12f810

File tree

2 files changed

+30
-113
lines changed

2 files changed

+30
-113
lines changed

README.md

Lines changed: 16 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ Cheatsheets for experienced React developers getting started with TypeScript
5858
- [Section 1: Setup TypeScript with React](#section-1-setup-typescript-with-react)
5959
<!--START-SECTION:setup-toc-->
6060
- [Prerequisites](#prerequisites)
61-
- [VS Code Extensions](#vs-code-extensions)
62-
- [React + TypeScript Starter Kits](#react--typescript-starter-kits)
63-
- [Video Tutorial](#video-tutorial)<!--END-SECTION:setup-toc-->
61+
- [React and TypeScript starter kits](#react-and-typescript-starter-kits)
62+
- [Try React and TypeScript online](#try-react-and-typescript-online)<!--END-SECTION:setup-toc-->
6463
- [Section 2: Getting Started](#section-2-getting-started)
6564
- [Function Components](#function-components)
6665
- [Hooks](#hooks)
@@ -143,74 +142,33 @@ Cheatsheets for experienced React developers getting started with TypeScript
143142

144143
<!--START-SECTION:setup-->
145144

146-
### Section 1: Setup TypeScript with React
145+
### Section 1: Setup
147146

148147
#### Prerequisites
149148

150149
You can use this cheatsheet for reference at any skill level, but basic understanding of React and TypeScript is assumed. Here is a list of prerequisites:
151150

152-
- Good understanding of [React](https://reactjs.org).
151+
- Basic understanding of [React](https://react.dev/).
153152
- Familiarity with [TypeScript Basics](https://www.typescriptlang.org/docs/handbook/2/basic-types.html) and [Everyday Types](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html).
154-
- Having read [the TypeScript section in the official React docs](https://reactjs.org/docs/static-type-checking.html#typescript).
155-
- Having read [the React section of the TypeScript playground](http://www.typescriptlang.org/play/index.html?jsx=2&esModuleInterop=true&e=181#example/typescript-with-react).
156153

157-
This guide will always assume you are starting with the latest TypeScript and React versions. Notes for older versions will be in expandable `<details>` tags.
154+
In the cheatsheet we assume you are using the latest versions of React and TypeScript.
158155

159-
#### VS Code Extensions
156+
#### React and TypeScript starter kits
160157

161-
- Refactoring help https://marketplace.visualstudio.com/items?itemName=paulshen.paul-typescript-toolkit
162-
- R+TS Code Snippets (there are a few...)
163-
- https://marketplace.visualstudio.com/items?itemName=infeng.vscode-react-typescript
164-
- https://www.digitalocean.com/community/tutorials/the-best-react-extension-for-vs-code
165-
- TypeScript official extension https://code.visualstudio.com/docs/languages/typescript
166-
- JavaScript and TypeScript Nightly https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next
158+
React has documentation for [how to start a new React project](https://react.dev/learn/start-a-new-react-project) with some of the most popular frameworks. Here's how to start them with TypeScript:
167159

168-
#### React + TypeScript Starter Kits
160+
- [Next.js](https://nextjs.org/docs/basic-features/typescript): `npx create-next-app@latest --ts`
161+
- [Remix](https://remix.run/docs/tutorials/blog): `npx create-remix@latest`
162+
- [Gatsby](https://www.gatsbyjs.com/docs/how-to/custom-configuration/typescript/): `npm init gatsby --ts`
163+
- [Expo](https://docs.expo.dev/guides/typescript/): `npx create-react-native-app -t with-typescript`
169164

170-
Cloud setups:
165+
#### Try React and TypeScript online
171166

172-
- [TypeScript Playground with React](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAKjgQwM5wEoFNkGN4BmUEIcA5FDvmQNwCwAUKJLHAN5wCuqWAyjMhhYANFx4BRAgSz44AXzhES5Snhi1GjLAA8W8XBAB2qeAGEInQ0KjjtycABsscALxwAFAEpXAPnaM4OANjeABtA0sYUR4Yc0iAXVcxPgEhdwAGT3oGAOTJaXx3L19-BkDAgBMIXE4QLCsAOhhgGCckgAMATQsgh2BcAGssCrgAEjYIqwVmutR27MC5LM0yuEoYTihDD1zAgB4K4AA3H13yvbAfbs5e-qGRiYspuBmsVD2Aekuz-YAjThgMCMcCMpj6gxcbGKLj8MTiVnck3gAGo4ABGTxyU6rcrlMF3OB1H5wT7-QFGbG4z6HE65ZYMOSMIA) just if you are debugging types (and reporting issues), not for running code
173-
- [CodeSandbox](http://ts.react.new) - cloud IDE, boots up super fast
174-
- [Stackblitz](https://stackblitz.com/edit/react-typescript-base) - cloud IDE, boots up super fast
167+
There are some tools that let you run React and TypeScript online, which can be helpful for debugging or making sharable reproductions.
175168

176-
Local dev setups:
177-
178-
- [Next.js](https://nextjs.org/docs/basic-features/typescript): `npx create-next-app@latest --ts` will create in your current folder
179-
- [Create React App](https://facebook.github.io/create-react-app/docs/adding-typescript): `npx create-react-app name-of-app --template typescript` will create in new folder
180-
- [Vite](https://vitejs.dev/): `npm create vite@latest my-react-ts-app -- --template react-ts`
181-
- [Meteor](https://guide.meteor.com/build-tool.html#typescript): `meteor create --typescript name-of-my-new-typescript-app`
182-
- [Ignite](https://github.com/infinitered/ignite#use-ignite-andross-infinite-red-andross-boilerplate) for React Native: `ignite new myapp`
183-
- [TSDX](https://tsdx.io/): `npx tsdx create mylib` for Creating React+TS _libraries_. (in future: [TurboRepo](https://twitter.com/jaredpalmer/status/1346217789942591488))
184-
185-
<details>
186-
<summary><b>Other tools</b></summary>
187-
188-
Less mature tools still worth checking out:
189-
190-
- [Snowpack](<https://www.snowpack.dev/#create-snowpack-app-(csa)>): `npx create-snowpack-app my-app --template app-template-react-typescript`
191-
- [Docusaurus v2](https://v2.docusaurus.io/docs/installation) with [TypeScript Support](https://v2.docusaurus.io/docs/typescript-support)
192-
- [Parcel](https://v2.parceljs.org/languages/typescript/)
193-
- [JP Morgan's `modular`](https://github.com/jpmorganchase/modular): CRA + TS + Yarn Workspaces toolkit. `yarn create modular-react-app <project-name>`
194-
195-
Manual setup:
196-
197-
- [Basarat's guide](https://github.com/basarat/typescript-react/tree/master/01%20bootstrap) for **manual setup** of React + TypeScript + Webpack + Babel
198-
- In particular, make sure that you have `@types/react` and `@types/react-dom` installed ([Read more about the DefinitelyTyped project if you are unfamiliar](https://definitelytyped.org/))
199-
- There are also many React + TypeScript boilerplates, please see [our Other Resources list](https://react-typescript-cheatsheet.netlify.app/docs/basic/recommended/resources/).
200-
201-
</details>
202-
203-
#### Video Tutorial
204-
205-
Have a look at the 7-part "React Typescript Course" video series below for an introduction to TypeScript with React.
206-
207-
<a href="https://www.youtube.com/watch?v=PL1NUl7fQ2I&list=PLG-Mk4wQm9_LyKE5EwoZz2_GGXR-zJ5Ml">
208-
<img
209-
width="200px"
210-
alt="react typescript course video series"
211-
src="https://i.imgur.com/IIG0Xu9.jpeg"
212-
/>
213-
</a>
169+
- [TypeScript playground](https://www.typescriptlang.org/play?target=8&jsx=4#code/JYWwDg9gTgLgBAbzgVwM4FMDKMCGN0A0KGAogGZnoDG8AvnGVBCHAORTo42sDcAsAChB6AB6RYcKhAB2qeAGEIyafihwAvHAAUASg0A+RILiSZcuAG0pymEQwxFNgLobiWXPi0AGHfyECTNHRyShotXQMjAJM4ABMIKmQQdBUAOhhgGAAbdFcAAwBNJUks4CoAa3RYuAASBGsVegzk1Dy-E1pfQWM4DhhkKGltHpMAHn0RmNGwfSLkErLK6vqlRrhm9FRRgHoZybGAI2QYGBk4GXlSivUECPVDe0cVLQb4AGo4AEYdWgnomJil0WcGS+zgOyOJxkfwBOxhcC6AlogiAA)
170+
- [StackBlitz](https://stackblitz.com/fork/react-ts)
171+
- [CodeSandbox](https://ts.react.new/)
214172

215173
<!--END-SECTION:setup-->
216174

docs/basic/setup.md

Lines changed: 14 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,30 @@
11
---
22
id: setup
3-
title: Setup TypeScript with React
3+
title: Setup
44
---
55

66
## Prerequisites
77

88
You can use this cheatsheet for reference at any skill level, but basic understanding of React and TypeScript is assumed. Here is a list of prerequisites:
99

10-
- Good understanding of [React](https://reactjs.org).
10+
- Basic understanding of [React](https://react.dev/).
1111
- Familiarity with [TypeScript Basics](https://www.typescriptlang.org/docs/handbook/2/basic-types.html) and [Everyday Types](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html).
12-
- Having read [the TypeScript section in the official React docs](https://reactjs.org/docs/static-type-checking.html#typescript).
13-
- Having read [the React section of the TypeScript playground](http://www.typescriptlang.org/play/index.html?jsx=2&esModuleInterop=true&e=181#example/typescript-with-react).
1412

15-
This guide will always assume you are starting with the latest TypeScript and React versions. Notes for older versions will be in expandable `<details>` tags.
13+
In the cheatsheet we assume you are using the latest versions of React and TypeScript.
1614

17-
## VS Code Extensions
15+
## React and TypeScript starter kits
1816

19-
- Refactoring help https://marketplace.visualstudio.com/items?itemName=paulshen.paul-typescript-toolkit
20-
- R+TS Code Snippets (there are a few...)
21-
- https://marketplace.visualstudio.com/items?itemName=infeng.vscode-react-typescript
22-
- https://www.digitalocean.com/community/tutorials/the-best-react-extension-for-vs-code
23-
- TypeScript official extension https://code.visualstudio.com/docs/languages/typescript
24-
- JavaScript and TypeScript Nightly https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next
17+
React has documentation for [how to start a new React project](https://react.dev/learn/start-a-new-react-project) with some of the most popular frameworks. Here's how to start them with TypeScript:
2518

26-
## React + TypeScript Starter Kits
19+
- [Next.js](https://nextjs.org/docs/basic-features/typescript): `npx create-next-app@latest --ts`
20+
- [Remix](https://remix.run/docs/tutorials/blog): `npx create-remix@latest`
21+
- [Gatsby](https://www.gatsbyjs.com/docs/how-to/custom-configuration/typescript/): `npm init gatsby --ts`
22+
- [Expo](https://docs.expo.dev/guides/typescript/): `npx create-react-native-app -t with-typescript`
2723

28-
Cloud setups:
24+
## Try React and TypeScript online
2925

30-
- [TypeScript Playground with React](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAKjgQwM5wEoFNkGN4BmUEIcA5FDvmQNwCwAUKJLHAN5wCuqWAyjMhhYANFx4BRAgSz44AXzhES5Snhi1GjLAA8W8XBAB2qeAGEInQ0KjjtycABsscALxwAFAEpXAPnaM4OANjeABtA0sYUR4Yc0iAXVcxPgEhdwAGT3oGAOTJaXx3L19-BkDAgBMIXE4QLCsAOhhgGCckgAMATQsgh2BcAGssCrgAEjYIqwVmutR27MC5LM0yuEoYTihDD1zAgB4K4AA3H13yvbAfbs5e-qGRiYspuBmsVD2Aekuz-YAjThgMCMcCMpj6gxcbGKLj8MTiVnck3gAGo4ABGTxyU6rcrlMF3OB1H5wT7-QFGbG4z6HE65ZYMOSMIA) just if you are debugging types (and reporting issues), not for running code
31-
- [CodeSandbox](http://ts.react.new) - cloud IDE, boots up super fast
32-
- [Stackblitz](https://stackblitz.com/edit/react-typescript-base) - cloud IDE, boots up super fast
26+
There are some tools that let you run React and TypeScript online, which can be helpful for debugging or making sharable reproductions.
3327

34-
Local dev setups:
35-
36-
- [Next.js](https://nextjs.org/docs/basic-features/typescript): `npx create-next-app@latest --ts` will create in your current folder
37-
- [Create React App](https://facebook.github.io/create-react-app/docs/adding-typescript): `npx create-react-app name-of-app --template typescript` will create in new folder
38-
- [Vite](https://vitejs.dev/): `npm create vite@latest my-react-ts-app -- --template react-ts`
39-
- [Meteor](https://guide.meteor.com/build-tool.html#typescript): `meteor create --typescript name-of-my-new-typescript-app`
40-
- [Ignite](https://github.com/infinitered/ignite#use-ignite-andross-infinite-red-andross-boilerplate) for React Native: `ignite new myapp`
41-
- [TSDX](https://tsdx.io/): `npx tsdx create mylib` for Creating React+TS _libraries_. (in future: [TurboRepo](https://twitter.com/jaredpalmer/status/1346217789942591488))
42-
43-
<details>
44-
<summary><b>Other tools</b></summary>
45-
46-
Less mature tools still worth checking out:
47-
48-
- [Snowpack](<https://www.snowpack.dev/#create-snowpack-app-(csa)>): `npx create-snowpack-app my-app --template app-template-react-typescript`
49-
- [Docusaurus v2](https://v2.docusaurus.io/docs/installation) with [TypeScript Support](https://v2.docusaurus.io/docs/typescript-support)
50-
- [Parcel](https://v2.parceljs.org/languages/typescript/)
51-
- [JP Morgan's `modular`](https://github.com/jpmorganchase/modular): CRA + TS + Yarn Workspaces toolkit. `yarn create modular-react-app <project-name>`
52-
53-
Manual setup:
54-
55-
- [Basarat's guide](https://github.com/basarat/typescript-react/tree/master/01%20bootstrap) for **manual setup** of React + TypeScript + Webpack + Babel
56-
- In particular, make sure that you have `@types/react` and `@types/react-dom` installed ([Read more about the DefinitelyTyped project if you are unfamiliar](https://definitelytyped.org/))
57-
- There are also many React + TypeScript boilerplates, please see [our Other Resources list](https://react-typescript-cheatsheet.netlify.app/docs/basic/recommended/resources/).
58-
59-
</details>
60-
61-
## Video Tutorial
62-
63-
Have a look at the 7-part "React Typescript Course" video series below for an introduction to TypeScript with React.
64-
65-
<a href="https://www.youtube.com/watch?v=PL1NUl7fQ2I&list=PLG-Mk4wQm9_LyKE5EwoZz2_GGXR-zJ5Ml">
66-
<img
67-
width="200px"
68-
alt="react typescript course video series"
69-
src="https://i.imgur.com/IIG0Xu9.jpeg"
70-
/>
71-
</a>
28+
- [TypeScript playground](https://www.typescriptlang.org/play?target=8&jsx=4#code/JYWwDg9gTgLgBAbzgVwM4FMDKMCGN0A0KGAogGZnoDG8AvnGVBCHAORTo42sDcAsAChB6AB6RYcKhAB2qeAGEIyafihwAvHAAUASg0A+RILiSZcuAG0pymEQwxFNgLobiWXPi0AGHfyECTNHRyShotXQMjAJM4ABMIKmQQdBUAOhhgGAAbdFcAAwBNJUks4CoAa3RYuAASBGsVegzk1Dy-E1pfQWM4DhhkKGltHpMAHn0RmNGwfSLkErLK6vqlRrhm9FRRgHoZybGAI2QYGBk4GXlSivUECPVDe0cVLQb4AGo4AEYdWgnomJil0WcGS+zgOyOJxkfwBOxhcC6AlogiAA)
29+
- [StackBlitz](https://stackblitz.com/fork/react-ts)
30+
- [CodeSandbox](https://ts.react.new/)

0 commit comments

Comments
 (0)