Skip to content

Update cra-template for react18 - #12226

Closed
winterlood wants to merge 2 commits into
react:mainfrom
winterlood:main
Closed

Update cra-template for react18#12226
winterlood wants to merge 2 commits into
react:mainfrom
winterlood:main

Conversation

@winterlood

Copy link
Copy Markdown

CRA install react template that use react 18 version

so we should update DOM API ReactDOM.render() -> ReactDOM.createRoot()

@winterloodwinterlood reopened this Apr 2, 2022
import reportWebVitals from './reportWebVitals';

ReactDOM.render(
const rootElment = document.getElementById('root') as HTMLElement

@kode15333kode15333Apr 3, 2022

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
constrootElment=document.getElementById('root')asHTMLElement
constrootElement=document.getElementById('root')asHTMLElement

I think this is a typo 🤣

@minimabot

Copy link
Copy Markdown

It seems a duplicate of #12220.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@winterlood@minimabot@kode15333@facebook-github-bot