react-native-spotlight-tour icon indicating copy to clipboard operation
react-native-spotlight-tour copied to clipboard

Bring up tour only on the first run of the app

Open Adarsh1993 opened this issue 3 years ago • 3 comments

Thanks for great package .

How to hints show in first time when app is start .

second time disable . This is possible with spotlight tour.

Thank you

Adarsh1993 avatar Mar 18 '22 10:03 Adarsh1993

Hi @Adarsh1993, I'm glad you're finding this package useful 🙂

It's possible to start the tour as soon as the app begins using a ref and a useEffect(..). We had a suggestion about making this easier in #50, and we'll be implementing a prop for that soon. You can also find a complete example of it in that issue.

There's no built-in feature to start the tour only the first time, but you can add that logic yourself in the useEffect mentioned above. You can use a package like async-storage to store a per-device flag. Then you can start the tour base on this flag and update the flag once the tour has finished.

This could be a great feature for us to implement since most people might be using the tour this way, and we could reduce the burden of managing the stored flags. However, we'd have to evaluate the details because that'd mean adding a dependency on async-storage or a similar package.

I'll leave this ticket open to keep you posted on the topic. Thanks again! Your feedback helps us make this package better and better 🙂

JoseLion avatar Mar 22 '22 15:03 JoseLion

@JoseLion Yes please this feature is very important. If you can add it it would amazing! 💪

mohamedabkal avatar Jun 17 '22 18:06 mohamedabkal

This is on the developer to implement, not on the library. Use something like a useEffect in conjunction with AsyncStorage to set a hasSeenTour value.

jakequade-hsm avatar Jul 18 '24 00:07 jakequade-hsm