question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Redux-saga compatibility

See original GitHub issue

Hi @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:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sneascommented, Sep 23, 2018

Thanks for your reply, @JamesAlias. I suppose Saga uses Object.defineProperty instead of Object.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.

0reactions
navneet-gcommented, Jan 15, 2019

Sure … will do 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found