Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Upgrade to React 17.0.x #664

Open
jackcmeyer opened this issue Dec 15, 2020 · 8 comments 路 May be fixed by #683
Open

Upgrade to React 17.0.x #664

jackcmeyer opened this issue Dec 15, 2020 · 8 comments 路 May be fixed by #683
Assignees
Labels
dependencies Pull requests that update a dependency file in progress

Comments

@jackcmeyer
Copy link
Member

馃殌 Feature Proposal

Upgrade components library to react 17.0.x

@jackcmeyer jackcmeyer added help wanted Extra attention is needed dependencies Pull requests that update a dependency file labels Dec 15, 2020
@matteovivona matteovivona added the good first issue Good for newcomers label Dec 16, 2020
@riiniii
Copy link

riiniii commented Jan 15, 2021

@jackcmeyer could i take this one?

@matteovivona
Copy link
Contributor

Ok @riiniii

@matteovivona matteovivona added in progress and removed good first issue Good for newcomers help wanted Extra attention is needed labels Jan 15, 2021
riiniii added a commit to riiniii/components that referenced this issue Jan 15, 2021
riiniii added a commit to riiniii/components that referenced this issue Jan 15, 2021
riiniii added a commit to riiniii/components that referenced this issue Jan 15, 2021
riiniii added a commit to riiniii/components that referenced this issue Jan 15, 2021
@riiniii
Copy link

riiniii commented Jan 15, 2021

@tehkapa is it ok to place this one on hold?

reason:
need to wait for tsdx to support typescript version 4 for this reason:
jaredpalmer/tsdx#926 (comment)

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

@riiniii
Copy link

riiniii commented Jan 15, 2021

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

@matteovivona
Copy link
Contributor

@jackcmeyer @blestab any clue?

@blestab
Copy link

blestab commented Jan 18, 2021

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

@riiniii
Copy link

riiniii commented Jan 24, 2021

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:
Screen Shot 2021-01-24 at 9 59 19 PM

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?

@riiniii
Copy link

riiniii commented Jan 24, 2021

this thread on how CRA implements React 17 + JSX Transform summarizes my findings / changes well
https://gist.github.com/iansu/4fab7a9bfa5fa6ebc87a908c62f5340b

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants