When using Redux, Material-UI, Snackbar, React Router & CssBaseline all together what should be the wrapping order?
When using
- Redux,
- Material-UI
- Snackbar
- React Router
- CssBaseline
all together what should be the wrapping order?
1 Answer
4 years ago by VD
Following example code shows how to use them together
ReactDOM.render(
<Provider store={store}>
<MuiThemeProvider theme={theme}>
<SnackbarProvider maxSnack={6}>
<CssBaseline />
<BrowserRouter basename="/">
<Switch>
<Route exact path='/' component={HomePage} />
<Route path='/login' component={LoginPage} />
</Switch>
</BrowserRouter>
</SnackbarProvider>
</MuiThemeProvider>
</Provider>
4 years ago by Karthik Divi