Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable react strict mode on third party libraries

We use strict mode in our React app. But third parties does not use strict mode. How can I achieve this?

like image 700
babbego Avatar asked Dec 09 '25 00:12

babbego


1 Answers

In index.js file remove the React.StrictMode wrapper.

From this

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
  <React.StrictMode>
     <App />
  </React.StrictMode>
);

To this

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(<App />);
like image 61
Mustafa Bin Avatar answered Dec 11 '25 14:12

Mustafa Bin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!