Comments (7)
Maybe a thing you need to know:
if your zones
are embedded into a stack view for react-navigation and maybe be visible after a transition; if the start()
occurs before the transition that may not work as expected. To fix it you have to wait until transition end.
You can do it using the react-navigation listener:
const { addListener } = useNavigation();
const [transitionEnd, setTransitionEnd] = useState(false);
useEffect(() => {
const unsubscribe = addListener('transitionEnd', () => {
setTransitionEnd(true);
});
return () => {
if (unsubscribe) {
unsubscribe();
}
};
}, []);
useEffect(() => {
if(canStart && transitionEnd) {
start()
}
}, [canStart, transitionEnd])
from rn-tourguide.
sounds good, I will provide a code example on a snack with react-navigation.
from rn-tourguide.
I appreciate your feedback and guidance, I will post my findings. I am still am putting together a simple implementation with react native navigation as a test, I will add complexity from there.
from rn-tourguide.
Also, am I able to run more than one tour, I am looking to have one per RN nav screen in my app... I tried setting this up to no avail... or a way to create them dynamically
from rn-tourguide.
Hi @mzupek,
I think I understand a bit about what is the problem as you described the zones
in simple UI works fine but when going to something more complex we don't yet have a good solution yet.
BTW it will be a good starting point if you provide a code example on a snack (with react-navigation).
from rn-tourguide.
thanks for that info that will be helpful for sure, as I am sure that is occurring.
I have some thoughts, would just love some feedback from your perspective?
The functionality that I am really looking to implement is a tour for each module in my app, most modules have a series of "react-navigation screens", I would like the main screen component of the module to be wrapped in its own <TourGuideProvider>
rather than it being on the root... so I can have the tour
be on a toggle on each of those main screens, giving new users an intro to using the app on their first run-through and be disabled after, also providing a menu of available tours, that will navigate them to the main screen of that specific module and start that tour.
That's my eventual end goal...lol... any thoughts/ideas are much appreciated.
from rn-tourguide.
I don’t see any issue to have multiple tour guide instead of one at the root if you are sure there isn’t nested tour guide provider.
But think about it, with only one provider at root you gain less code.
And even if some are the same zone number that will not cause issue if views with tour guide are not one over another. Actually the calculation is acted when render.
from rn-tourguide.
Related Issues (20)
- [Feature Request] Add support for `maskOffset` for multiple directions or allow to pass `styleProp` for the mask
- Multiple tours in the same component HOT 1
- [Android] dismissOnPress doesnt work. HOT 1
- Forcing tooltip to appear at the bottom of the TourGuideZone HOT 1
- Text of next step already briefly visible when going to next step HOT 1
- "undefined is not an object" when tour has ended HOT 2
- no props for changing background color for the modal of rn-tourguide(skip,previous,next) HOT 1
- Does not work with react-native's modal component HOT 6
- Optional loading of the Tourguide Controller
- Fading tooltip text
- How to highlight bottom tab from react navigation? HOT 1
- TypeError: Cannot read property '_nativeTag' of null
- web support with expo-sdk >= 48 HOT 1
- Restarting the guide HOT 1
- Passing tourKey to useTourGuideController returns undefined eventEmitter HOT 5
- Mutiple pages tours not running
- issue of tour guide rendering while showing tour in scrollview.
- ERROR while scrolling back outside the refferred scrollview HOT 4
- Android dark mode is switching the text color to white HOT 4
- Multiple screens Issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rn-tourguide.