Update templates to use React 18 createRoot#12220
Conversation
|
Hi @kyletsang! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
createRootcreateRoot
| import reportWebVitals from './reportWebVitals'; | ||
|
|
||
| ReactDOM.render( | ||
| const root = ReactDOM.createRoot( |
There was a problem hiding this comment.
Im also getting warnings in the default app.test.js file since it uses the render method from react testing library. Not sure if that needs a similar fix but in case you know better than i do i thought i'd point it out. Thanks so much for this PR i think it'll be really crucial going forward
5f2dc08 to
b5288ec
Compare
|
Hey just checking in, what's blocking this? |
|
Now that the TypeScript types for React 18 are out nothing is blocking this. Does this need to be merged along with #12223? |
Yes, the RTL update should also be merged for react 18 compatibility. Thanks! |
|
@kyletsang I merged the RTL PR. Do you mind updating this branch from main so we can re-run the tests? |
b5288ec to
d9ae406
Compare
|
@iansu done! |
|
Thanks! |
|
At which version, is this going to fix? As far today(April 10th, 2022), the |
Fixes #12219
Since CRA installs React 18 by default now, we should update the template to use the new
createRoot