Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react 18 rendering twice

`React intentionally remounts your components in development 
to help you find bugs. You can turn off Strict Mode to opt out of the development behavior,
but we recommend keeping it on.` (Docs)

// To disable: Remove <React.StrictMode> or <StrictMode>
root.render( <React.StrictMode>
    	       <App />
             </React.StrictMode>);
// After:
root.render( <App /> );
Source by beta.reactjs.org #
 
PREVIOUS NEXT
Tagged: #react #rendering
ADD COMMENT
Topic
Name
9+7 =