We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The React recipe is not showing a correct example of src/index.js for React v18.
src/index.js
ReactDOM.render is no more used in React v18, instead it's necessary to use ReactDOM.createRoot.
ReactDOM.render
ReactDOM.createRoot
This is a practical working example that can be used:
import ReactDOM from "react-dom/client"; import { App } from "./App"; const root = ReactDOM.createRoot(document.getElementById("app")); root.render(<App />);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The React recipe is not showing a correct example of
src/index.js
for React v18.ReactDOM.render
is no more used in React v18, instead it's necessary to useReactDOM.createRoot
.This is a practical working example that can be used:
The text was updated successfully, but these errors were encountered: