1import React from 'react';
2
3function ExampleApplication() {
4 return (
5 <div>
6 <Header />
7 <React.StrictMode> <div>
8 <ComponentOne />
9 <ComponentTwo />
10 </div>
11 </React.StrictMode> <Footer />
12 </div>
13 );
14}
1// React.StrictMode should wrap the whole application including the provider too. So Change your code like bellow:
2 <React.StrictMode>
3 <Provider store={store}>
4 <App />
5 </Provider>
6 </React.StrictMode>,
7 document.getElementById('root')
1// https://reactjs.org/docs/strict-mode.html
2
3import React from 'react';
4
5function ExampleApplication() {
6 return (
7 <div>
8 <Header />
9 <React.StrictMode>
10 <div>
11 <ComponentOne />
12 <ComponentTwo />
13 </div>
14 </React.StrictMode>
15 <Footer />
16 </div>
17 );
18}
19
20/*
21 In the above example, strict mode checks will not be run
22 against the Header and Footer components.
23 However, ComponentOne and ComponentTwo, as well as all of their
24 descendants, will have the checks.
25*/