Redux-saga compatibility
See original GitHub issueHi @Hotell, thanks a lot for the library. It provides the best typesafe Redux + Typescript FSA solution (as far as I can see).
Unfortunately it does not work with Redux-saga as expected.
The problem is createAction()
function returns frozen object in DEV
environment, but Saga does Object.defineProperty(action, SAGA_ACTION, { value: true })
which leads to an exception:
TypeError: Cannot define property @@redux-saga/SAGA_ACTION, object is not extensible
For now I solve this problem by ‘unfreezing’ the action: yield put({...Actions.fetchSuccess(data)})
.
But my question is do we really need to return frozen action object with createAction()
? I understand it provides more ‘safe-to-be-used’ FSA, but on the other hand this solution conflicts with quite a popular Redux tool.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Redux-Saga - An intuitive Redux side effect manager. | Redux ...
Sagas enable numerous approaches to tackling parallel execution, task concurrency, task racing, task cancellation, and more. Keep total control over the ...
Read more >redux-saga - npm
Saga middleware for Redux to handle Side Effects. Latest version: 1.2.2, last published: 17 days ago. Start using redux-saga in your project ...
Read more >React 16.x compatibility · Issue #1267 · redux-saga ... - GitHub
We have react only as dev dependency. redux-saga doesn't care about what framework do you use, it's completely agnostic of this.
Read more >eslint-plugin-redux-saga versions and peer dependencies
Online Peer dependency version tool to search for compatible versions of related NPM packages.
Read more >reactotron-redux-saga | Yarn - Package Manager
Version compatibility. redux-saga version 1.0.0 support was introduced in reactotron-redux-saga version 3.0.0. If you are using a version of redux-saga ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for your reply, @JamesAlias. I suppose Saga uses
Object.defineProperty
instead ofObject.assign
in order not to expose it’s action’s modifications to Redux Dev Tools…I’ve also decided to switch to Redux-Observables.
Will close the issue even though I still believe redux-saga compatibility could be beneficial for the project by increasing it’s popularity.
Sure … will do 😃