Skip to content

Instantly share code, notes, and snippets.

View ArcanisCz's full-sized avatar
💭
I may be slow to respond.

Tomáš Jílek ArcanisCz

💭
I may be slow to respond.
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();