Hi. I have a similar problem to issue #4 . Seems none of the actions are fired even though I used the addFormSubmitSagaTo function. I also tried also adding the saga to my sagas root.
I think I followed all the steps. Here's my code:
// sagas.ts
import { demoGamesOperations } from './demo-games';
import { all } from 'redux-saga/effects';
export default function* rootSaga() {
yield all([
demoGamesOperations(),
]);
}
// reducers.ts
import demoGames from './demo-games';
import { reducer as form } from 'redux-form/immutable';
export default {
demoGames,
form,
};
// store.ts
import { createStore, applyMiddleware } from 'redux';
import * as withRedux from 'next-redux-wrapper';
import nextReduxSaga from 'next-redux-saga';
import createSagaMiddleware from 'redux-saga';
import { combineReducers } from 'redux-immutable';
import { fromJS } from 'immutable';
import { addFormSubmitSagaTo } from 'redux-form-submit-saga/immutable';
import reducers from 'ducks/reducers';
import allSagas from 'ducks/sagas';
const sagaMiddleWare = createSagaMiddleware();
const rootReducer = combineReducers(reducers);
const middleware = [ sagaMiddleWare ];
export function configureStore(initalState = {}) {
const store = createStore(rootReducer, fromJS(initalState), applyMiddleware(...middleware));
const rootSaga = addFormSubmitSagaTo(allSagas);
store.sagaTask = sagaMiddleWare.run(rootSaga);
return store;
}
export function withReduxSaga(BaseComponent: any) {
return withRedux(configureStore)(nextReduxSaga(BaseComponent));
}
Hi. I have a similar problem to issue #4 . Seems none of the actions are fired even though I used the
addFormSubmitSagaTo
function. I also tried also adding the saga to my sagas root.I think I followed all the steps. Here's my code: