stackbuilders / react-native-spotlight-tour

A highly customizable tour feature with an awesome spotlight effect
https://stackbuilders.github.io/react-native-spotlight-tour/
MIT License
237 stars 27 forks source link

Suggestion: Add ability to hide/show the Tour #144

Open ravanscafi opened 8 months ago

ravanscafi commented 8 months ago

Hello 👋

I would love to have the ability to hide the tour temporarily and then show it again. I want the user to be able to perform some actions in between the steps.

I can mimic this behavior by saving the last non-undefined current, calling stop(), and then calling goTo(lastCurrent). However, it's far from ideal, as it has the setSpot(ZERO_SPOT) on the stop() method it performs some animations (at least in slide).

The context could provide a simple hide() and show() that is managed by the library itself, making it easier to use and with better (or no) transitions. Also, calling next()/previous() could still work anyway :)

hdbv95 commented 4 months ago

Hey @ravanscafi, thanks for showing interest in the library, as for your suggestion, I'll give it a try but will be using pause() instead of hide() for it to fit better with the existing methods.