Skip to content

Instantly share code, notes, and snippets.

View uladzislau-stuk's full-sized avatar
🤙
Have a good code day!

u.s uladzislau-stuk

🤙
Have a good code day!
  • Andersen People
  • Belarus
View GitHub Profile
@ArcanisCz
ArcanisCz / createProvider.js
Last active March 22, 2024 05:41
React Error Boundary, which can catch Component + Redux + Saga errors
/*
* Usage:
* const AppProvider = createProvider(rootReducer, rootSaga);
* ...
* <AppProvider>
* <AppComponent>
* </AppProvider>
*/
const createProvider = (reducer, saga) => {
const sagaMiddleware = createSagaMiddleware();