How to use the @redux-saga/core function in @redux-saga/core

To help you get started, we’ve selected a few @redux-saga/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github KhronosGroup / glTF-Project-Explorer / src / index.tsx View on Github external
// A note about the use of redux here; a lot of inner deliberations were made
// before choosing to pull in both Redux and Sagas for this app. The idea is
// to keep this app mostly simple, but Redux and Sagas were pulled in for two
// major reasons:
//
//   1. We have to communicate data changes across the app to several components.
//   2. Redux makes managing complex state changes (such as filtering) easy.
//
// Yes, this is probably over-engineered, but Redux is the best tool for this
// potentially complex task. If you hate it, blame me and I'd be glad to bike
// shed about it with you. -ANM

const initialState = {};

const sagaMiddleware = createSagaMiddleware({});

const store = createStore(
  rootReducer,
  initialState,
  composeWithDevTools(applyMiddleware(sagaMiddleware))
);

sagaMiddleware.run(rootSagas);

ReactDOM.render(
  
    
  ,
  document.getElementById("root") as HTMLElement
);