Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ReactDOM.render is no longer supported in React 18

import * as ReactDOM from 'react-dom';
import App from 'App';

const container = document.getElementById('app');

// Initial render.
ReactDOM.render(<App tab="home" />, container);

// During an update, React would access
// the root of the DOM element.
ReactDOM.render(<App tab="profile" />, container);
Source by itsjavascript.com #
 
PREVIOUS NEXT
Tagged: #longer #supported #React
ADD COMMENT
Topic
Name
2+1 =