question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi 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:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
elrumordelaluzcommented, Sep 19, 2017

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 the startAt number, so 0 is the first one.

startat

1reaction
jovsterncommented, Sep 26, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found