New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Redux-Saga examples to the async-flow section #131
Comments
Duplicated piotrwitek/typesafe-actions#89 |
@rmilejcz Yes, I'm considering to add it. Here is the PR: piotrwitek/typesafe-actions#89 |
I take a slightly different approach, since my setup is relying heavily on the
Then you can define your return signature with:
Which I abstract out to:
where and it all combines nicely:
so the payload can be handled with typesafety. There are two issues with this:
Obviously having type safety for the action creators and their arguments would be desired, but the above example does provide better typesafety than nothing. If you need help or have any questions I'm happy to help, otherwise if you decide to go with that other PR that's fine too |
TBH I don't know what are benefits of your abstracted |
Added ReduxSaga example in typesafe-actions tutorial section: https://github.com/piotrwitek/typesafe-actions#starring-redux-saga-sagas |
Redux-saga is a fairly popular library, and getting it to play nicely with this library isn't immediately clear or intuitive. I propose a new set of code examples to helpers who would like to use typescript with redux-saga.
I figured I would check if this is something that might be desired, so if the maintainers here agree I would be more than happy to create these examples as I have already done much of the work in a project I'm currently working on.
The text was updated successfully, but these errors were encountered: