source code for Sliders example
SeifESlimene opened this issue · comments
Hello!
Could you please put the source code of sliders example please.
Thanks!
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...
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!
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!