Functional Component - How to set run to true and false ? #731
Closed
akshilshah
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
When I initiated the joyride and after the tour has finished I set it to the local storage as false.
Refreshing the page thought the run var is set to false it still renders,
I have tried using the state as defined here: https://stackoverflow.com/questions/62718091/how-to-restart-a-react-joyride-tour-after-it-has-ended-in-a-functional-component
but that it runs into
Uncaught Invariant Violation: Too many re-renders. React limits the number of renders to prevent an infinite loop
How do I set up joyride correctly?
Any help will be much-appreciated thanks!
Code
Beta Was this translation helpful? Give feedback.
All reactions