restart tour
See original GitHub issueHi man, i was wondering if theirs a clean way to restart the tour when the user finish all the steps? In our case, we have a button that the user can always come back to the tour and as you know it’s start from the step that the user quit and thats fine but, when he got to the final step and he finish or quit, if want to run the tour again, he start from the final step and that’s kind of radicals so, what we want is after the last step, restart the tour to the first step.
I used the startAt params and it’s working but i got a warning from react (###
forceUpdate(…): Cannot update during an existing state transition (such as within
render
…
) and i kind a think that’s a nasty solution.
my code:
resetTour = () => {
let {tourStore} = this.props;
return tourStore.currentStep === this.steps.length ? 0 : undefined
};
<Tour startAt={this.resetTour()}
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
RESTART TOUR (@restart__tour) • ...
586 Followers, 451 Following, 41 Posts - See Instagram photos and videos from RESTART TOUR (@restart__tour)
Read more >Restart
Find out more about Restart tour dates & tickets 2022-2023. Want to see Restart in concert? Find information on all of Restart's upcoming...
Read more >Restart Concert Tickets and Tour Dates
Restart tickets for the upcoming concert tour are on sale at StubHub. Buy and sell your Restart concert tickets today. Tickets are 100%...
Read more >Restart Boat (Sorrento) - All You Need to Know BEFORE ...
We booked our private boat tour through Restart Boats. Antonio Pollio (Aldo) was incredibly helpful and easy to work with. We originally wanted...
Read more >RestArt Tour - Home
Amiryan 5, 0001 Erevan, Armenia. Get Directions. 25 people checked in here. +374 96 520536. tour.restart@mail.ru. http://rest-art.am/. Closed now.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @jovstern I can’t reproduce the React warning. Setting
startAt={0}
doesn’t work for you?Here is my example where every time the user exit the Tour, restart from the first
step
(keep in mind that is Array like thestartAt
number, so0
is the first one.You got it right, the reason i work with the Mobx state and not the internal state of the widget it’s because i need that some widget in my global app will know about the current state. Everything work fine but i just don’t like the way i “restart the app”, maybe after it will be in production (2-3 weeks) i’ll send you a link and we can discuss more.