Open memon07 opened 2 years ago
if u are using different tours you can pass the tourKey to useTourGuideController
hook like this useTourGuideController('tourName')
, in that way you will be sure that the eventEmitters are from that specific tour
The working of
rn-tourguide
is to first wrap aTourGuideProvider
around your mainApp.js
and for using the functionalty you have to wrapTourGuideZone
around you desired component's View.App.js
TooltipComponent
The problem i am facing is that when i am using the custom Component i.e.
TooltipComponent
, the functions passed handlePrev, handleNext, handleStop does not have a callback method.so if i am using theTourGuideZone
in some another component i will have to listen to a event emitted by the package and check if its a 'start' or 'stop' and accordingly you can do you further process.Because the event emitter is being run in
useEffect
all the emitters starts running before even they are called. these causes the start and stop event running simultaneously. also there is no keys (as per my understanding) provided to differentiate between the events that are emitted.Is there anyway to differentiate between
eventEmitter.on('start')
andeventEmitter.on('stop')
.Demo.js
Can anyone please help me on this , if i have mistakenly forgot to add something to make this work. thanks in advance.
Yes i have asked this same question on stackOverflow too.