uiwjs / react-codemirror

CodeMirror 6 component for React. @codemirror https://uiwjs.github.io/react-codemirror/
https://uiwjs.github.io/react-codemirror/
MIT License
1.69k stars 134 forks source link

change tsconfig 'react-jsx' to 'react' #561

Open superdc opened 1 year ago

superdc commented 1 year ago

Now in tsconfig.json, it sets jsx 'react-jsx',this make JSX Syntax will be transformed to jsx,and jsx is referenced from 'runtime/react-jsx',but 'runtime/react-jsx' is not allowed in all React versions。When use react@16.13.0,it has error " Can't resolve 'react/jsx-runtime'".Should it be changed from 'react-jsx' to 'react',so it can transformed to React.createElement? image

jaywcjlove commented 1 year ago

@superdc createElement is a legacy API that will be removed in a future major version of React.

https://react.dev/reference/react/legacy

image
superdc commented 1 year ago

@superdc createElement is a legacy API that will be removed in a future major version of React.

https://react.dev/reference/react/legacy

image

createElement is legacy API, not deprecated API, it will not be removed

jaywcjlove commented 1 year ago

createElement is legacy API, not deprecated API, it will not be removed

These APIs will be removed in a future major version of React. @superdc

image