Answer the question
In order to leave comments, you need to log in
Are there any miracles with Redux-Saga?
Hello.
I have two absolutely identical pieces of code:
import { createStore, applyMiddleware, Store } from 'redux';
import createSagaMiddleware from 'redux-saga';
import { rootSaga } from './sagas';
import { rootReducer, IAppState } from './reducers';
const sagaMiddleware: any = createSagaMiddleware();
export function configureStore(): Store<IAppState> {
const store = createStore(rootReducer as any, (applyMiddleware(sagaMiddleware))
) as Store<IAppState>;
sagaMiddleware.run(rootSaga);
return store;
}
(alias) function rootSaga(): Generator<ForkEffect<void>[], void, unknown>
import rootSaga
(alias) function rootSaga(): Generator<ForkEffect[], void, unknown>
import rootSaga
export function* rootSaga() {
yield [fork(newsSaga)];
}
(alias) function newsSaga(): Generator<ForkEffect<never>, void, unknown>
import newsSaga
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question