rn-tourguide icon indicating copy to clipboard operation
rn-tourguide copied to clipboard

Different tours on the same screen and same component does not work

Open taniibarra opened this issue 1 year ago • 1 comments

I need to show two different tours on the same screen, same component and same user, but at different times. When I import the controller and pass a different key to the other controller, it does not open any tour. How do I solve this? Example:

const { canStart, start, eventEmitter } = useTourGuideController('collaborators');

const { canStart, start, eventEmitter, tourKey, getCurrentStep } = useTourGuideController('onboarding');

@xcarpentier

taniibarra avatar Feb 26 '24 15:02 taniibarra

You can do something like

const { canStart, start, eventEmitter } =
useTourGuideController('collaborators');

const { canStart: canStartOnboarding, start: startOnboarding, eventEmitter: eventEmitterOnboarding, tourKey: tourKeyOnboarding, getCurrentStep: getCurrentStepOnboarding } =
useTourGuideController('onboarding');

and then use start() for collaborators and startOnboarding() for onboarding

PriyavKaneria avatar Jun 26 '24 08:06 PriyavKaneria