Interest in a simple lifecycle callback system? #883
atomicpages
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Hey @atomicpages Sorry for the late reply. I'll try to fix some pending issues with react-floater the following weekend and get back on the migration. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently created a simple stateful wrapper around
react-joyride
that allows extends the current step API with a few new options that allow users to easily "hook" into the joyride lifecycle and run side effects without boilerplate. If this is something the community wants I'd be happy to contribute! Here are the details -- let me know 😄onLoad
type === "tooltip"
and allows users to run side effects before the step is rendered. Great if you need to perform some kind of action before the step is rendered like custom scrolling or clicking on something.onNext
type === "step:after"
and allows users to perform some logic when next is clicked (e.g. some async action, set a cookie, etc.)onPrevious
type === "steps:before"
same use case as above.delay
setTimeout
, great for things like animationsdepends
onLoad
,onNext
andonPrevious
callbacks. Great if you need data from a different step (e.g. perform a click)A sample use case:
Beta Was this translation helpful? Give feedback.
All reactions