Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ReactDOM.render is no longer supported in React 18

// Before
import { render } from 'react-dom';
const container = document.getElementById('app');
render(<App tab="home" />, container);

// After
import { createRoot } from 'react-dom/client';
const container = document.getElementById('app');
const root = createRoot(container);
root.render(<App tab="home" />);
Source by itsjavascript.com #
 
PREVIOUS NEXT
Tagged: #longer #supported #React
ADD COMMENT
Topic
Name
6+3 =