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’));
root.render(
<React.StrictMode>

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

</React.StrictMode>,
document.getElementById(“root”)
);

Can someone help please???

Thanks

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