Skip to content
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

source code for Sliders example #125

Closed
SeifESlimene opened this issue Apr 5, 2021 · 3 comments
Closed

source code for Sliders example #125

SeifESlimene opened this issue Apr 5, 2021 · 3 comments

Comments

@SeifESlimene
Copy link

Hello!
Could you please put the source code of sliders example please.
Thanks!

@mariusandra
Copy link
Member

Hi, I don't understand what you want me to do here and why...

Also, feel free to submit a pull request if you want any changes in the docs. This gives something tangible to discuss...

@SeifESlimene
Copy link
Author

This is the problem I got: https://www.youtube.com/watch?v=tS_I8JaKd4U
This is the repo: https://github.com/SeifESlimene/kea-app/blob/main/src/components/Sliders/Sliders.js
This is the example I want to achieve: https://kea-v1.netlify.app/guide/sliders
I should have just one console log whenever the slide change.

Thank you for helping me out!

@mariusandra
Copy link
Member

Ohh... Sliders, that's old code. 😁

I didn't run your repo, but I think what will get it working is if you change in Sliders.js#55 inside the saga this.actions to this.actionCreators. Alternatively writing sagaPlugin({ useLegacyUnboundActions: true }) inside resetContext({plugins}) should work.

However if at all possible, I recommend not reading those -v1 docs anymore and using the kea v2 docs instead. The v1 to v2 upgrade should be quite painless. I also recommend using listeners instead of sagas. They're much easier to work with and they come with loaders, which make a lot of things even simpler.

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants