mohebifar / react-native-copilot

Step-by-step walkthrough tooltip for your react native app
MIT License
2.25k stars 409 forks source link

React-Navigation - tour on multiple screens #301

Open abo-rythm opened 1 year ago

abo-rythm commented 1 year ago

Current Behavior Have steps on different react-navigation screens

  1. One step on first screen, it shows only the "Finish" button, as there are no other steps
  2. Next steps on other screen, shows the walkthroughable from the previous screen in the same position, which does not make sense, then the next step on the corresponding walkthroughable component on the current screen

Expected behavior/code Steps to be remembered on different react-navigation screens

Environment

Possible Solution

Additional context/Screenshots

Screenshot 2023-09-14 at 08 26 41 Screenshot 2023-09-14 at 08 31 29 Screenshot 2023-09-14 at 08 31 36
quicksilverr commented 12 months ago

@mohebifar Do we need to wrap the navigation container with the CopilotProvider?

amit13091992 commented 10 months ago

@abo-rythm @quicksilverr

If you want to use it in multiple screens then you can wrap main navigator with CopilotProvider and whichever element you want to use based on your requirements you can set the order.

nppull commented 2 months ago

same problem

carozo commented 2 months ago

I have wrapped my main navigator with CopilotProvider and this is still happening to me

quassainraza commented 15 hours ago

Wrap your root component aka App.js with Provider. and use start() in useEffect or button in every screen you want to show tooltips.