Q:

react.strictmode

// https://reactjs.org/docs/strict-mode.html

import React from 'react';

function ExampleApplication() {
  return (
    <div>
      <Header />
      <React.StrictMode>
        <div>
          <ComponentOne />
          <ComponentTwo />
        </div>
      </React.StrictMode>
      <Footer />
    </div>
  );
}

/*
  In the above example, strict mode checks will not be run 
  against the Header and Footer components. 
  However, ComponentOne and ComponentTwo, as well as all of their
  descendants, will have the checks.
*/
1
import React from 'react';

function ExampleApplication() {
  return (
    <div>
      <Header />
      <React.StrictMode>        <div>
          <ComponentOne />
          <ComponentTwo />
        </div>
      </React.StrictMode>      <Footer />
    </div>
  );
}
1
// React.StrictMode should wrap the whole application including the provider too. So Change your code like bellow:  
  <React.StrictMode>
    <Provider store={store}>
      <App />
    </Provider>
  </React.StrictMode>,
  document.getElementById('root')
0

New to Communities?

Join the community