Glad you liked it! Unfortunately I've never used Angular, but I hope this snippet will be of some help:
reducers/index.ts
import{combineReducers}from"redux";import{combineEpics}from"redux-observable";import{myEpic,myOtherEpic}from"../actions";importmyReducerfrom"./myReducer";importmyOtherReducerfrom"./myOtherReducer";// Pass epics.// Actions will run through reducers first and then epics.exportconstrootEpic=combineEpics(myEpic,myOtherEpic);// Pass reducers.exportdefaultcombineReducers({myReducer,myOtherReducer});
store/index.ts
import{createStore,applyMiddleware}from"redux";importthunkfrom"redux-thunk";importreducers,{rootEpic}from"../reducers";import{createEpicMiddleware}from"redux-observable";constepicMiddleware=createEpicMiddleware();conststore=createStore(reducers,{},applyMiddleware(thunk,epicMiddleware));epicMiddleware.run(rootEpic);// Useful if using TypeScript (optional)exporttypeRootStoreType=ReturnType<typeofreducers>;exportdefaultstore;
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
if you are using angular, can you show code snippet of adding this to the ngRedux configure store parameter. or do you a link to the full code.
I enjoyed it!
Glad you liked it! Unfortunately I've never used Angular, but I hope this snippet will be of some help:
reducers/index.ts
store/index.ts