-
-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
Milestone
Description
Is your proposal related to a problem?
TypeScript 4.1 supports React 17's new JSX factories:
TypeScript 4.1 supports React 17’s upcoming
jsxandjsxsfactory functions through two new options for thejsxcompiler option:
react-jsxreact-jsxdevThese options are intended for production and development compiles respectively. Often, the options from one can extend from the other. For example, a tsconfig.json for production builds might look like the following:
and one for development builds might look like the following:
// ./src/tsconfig.dev.json { "extends": "./tsconfig.json", "compilerOptions": { "jsx": "react-jsxdev" } }
Describe the solution you'd like
The default jsx transform in TypeScript should be react-jsxdev. Only when running react-scripts build it should be react-jsx.
Describe alternatives you've considered
Additional context
Related issues:
Background information:
kamthamc and byjokesedenniscual and kamthamc