krasimir / stent

Stent is combining the ideas of redux with the concept of state machines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is it possible to use it with redux-saga?

ValentinBlokhin opened this issue · comments

I have the issue when try to use saga effects:
Error: The state should be an object and it should always have at least "name" property. You passed {
"@@redux-saga/IO": true,
"SELECT": {
"args": []
}
}

Hey, can you paste some more code. How's the integration with redux-saga implemented.

commented
            'idle': {
                'start': function* ({ todos }, todo) {
                  yield 'submit';
                  const result = yield call(async);
                  this.success();
                },
            },

for example for a regular saga call. I guess there is no handler for saga actions in handleGenerator.js

Well, Stent is not a complete replacement of redux-saga. You are yielding to Stent not to redux-saga orchestration so such code will not work. Or in other words

function* ({ todos }, todo) {
  yield 'submit';
  const result = yield call(async);
  this.success();
}

is run by Stent and not by redux-saga.