I made a app using React with Vite, and i put inside my src/main.jsx these configs: ThemeProvider, Routes and a authentication context
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<ThemeProvider theme={ theme }>
<GlobalStyles />
<AuthProvider>
<Routes />
</AuthProvider>
</ThemeProvider>
</React.StrictMode>
);
BUT, some guy said me it isn't good, he says i need to create /src/App.jsx with those configs and later put the App inside main.jsx
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App />
</React.StrictMode>
);
What's the correct option?
Sorry for the english, i'm not very good with it.
Top comments (0)