components
components copied to clipboard
Upgrade to React 17.0.x
🚀 Feature Proposal
Upgrade components library to react 17.0.x
@jackcmeyer could i take this one?
Ok @riiniii
@tehKapa is it ok to place this one on hold?
reason: need to wait for tsdx to support typescript version 4 for this reason: https://github.com/formium/tsdx/issues/926#issuecomment-723495537
error:
config error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'.
but we need to use --jsx to 'react-jsx' for react 17, and their workaround in the thread does not work for me
alternatively, maybe if we don't even want to introduce jsx transform, then i can just update react versions in package.json without any other additional changes
@jackcmeyer @blestab any clue?
error:
config error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'.
Thanks @riiniii For the quoted error above, may you see if suggestions from this SO thread might work for you (assuming you have not already come across it)? https://stackoverflow.com/questions/50432556/cannot-use-jsx-unless-the-jsx-flag-is-provided
error:
config error TS6046: Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'.Thanks @riiniii For the quoted error above, may you see if suggestions from this SO thread might work for you (assuming you have not already come across it)? https://stackoverflow.com/questions/50432556/cannot-use-jsx-unless-the-jsx-flag-is-provided
hi @blestab, thank u for the suggestion. i tried that, but realized that I couldnt use 'preserve', 'react-native', or 'react' with typescript + react 17 transform.
my findings were that for JSX Tranform and typescript to work together, tsconfig.compilerOptions.jsx needs to be 'react-jsx' or 'react-jsxdev'
so generally everything passes until i run npm run build (tsdx build), which gives me this error to say my tsconfig options are not correct:

if we do not decide to implement jsx transform, i can still update to react v17, and keep typescript version + tsconfig.compilerOptions.jsx = 'react', and things can pass that way. just that we will not support jsx transform yet. thoughts?
this thread on how CRA implements React 17 + JSX Transform summarizes my findings / changes well https://gist.github.com/iansu/4fab7a9bfa5fa6ebc87a908c62f5340b