React DOM warning help

Hi guys im trying to replicate the amazon website and when I inspect my code a warning message comes up as follows;
Warning: You passed a container to the second argument of root.render(…). You don’t need to pass it again since you already passed it to create the root.

my code is;
const root = ReactDOM.createRoot(document.getElementById(‘root’));

<StateProvider initialState={initialState} reducer={Reducer}>
<App />


Can someone help please???


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.