From 0666e235b0519d99bcfa0d6e41fa96ee803b8464 Mon Sep 17 00:00:00 2001 From: ivanmcgregor Date: Tue, 6 Jul 2021 11:39:24 +0200 Subject: [PATCH] chore: updating typescript docs When switching an existing starter to use typescript, the files did have many errors. When comparing that to a new starter the main difference that was not mentioned was the import of react. With that, all default tags are known. It's more convenient to mention it here, too. --- docusaurus/docs/adding-typescript.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docusaurus/docs/adding-typescript.md b/docusaurus/docs/adding-typescript.md index 6f4c86c6cc7..8f6084071a8 100644 --- a/docusaurus/docs/adding-typescript.md +++ b/docusaurus/docs/adding-typescript.md @@ -35,7 +35,8 @@ yarn add typescript @types/node @types/react @types/react-dom @types/jest Next, rename any file to be a TypeScript file (e.g. `src/index.js` to `src/index.tsx`) and **restart your development server**! -Type errors will show up in the same console as the build one. You'll have to fix these type errors before you continue development or build your project. For advanced configuration, [see here](advanced-configuration.md). +Type errors will show up in the same console as the build one. You'll have to fix these type errors before you continue development or build your project. Many of them are fixed by adding `import React from 'react';` to your tsx files. +For advanced configuration, [see here](advanced-configuration.md). ## Getting Started with TypeScript and React