Closed inwoodev closed 4 months ago
Hi 😃
If a Route
has sub-routes you will need to add a /*
to the path. So your first Route
, which is currently
Route(RouteURL.authentication) { // "/auth/"
// ...
}
should be
Route("auth/*") {
// ...
}
This means the Route
will render its contents if the Navigator
's path is /auth
, /auth/standby
etc. The *
is important here, otherwise paths like /auth/standby/
or anything deeper won't be rendered.
This change alone should fix your problem.
Thank you for your help~ I could easily fix my problem with your solution. Now everything renders as expected :)
Hello, first of all, I do appreciate your effort. Thank you for building such an useful library. I am trying to develop a watch companion app using the swiftui-router and I am facing this issue of navigating to a black or blank?! screen. Perhaps, I may have not used the router properly...I still do need help with the correct implementation of the library.
here are sample codes similar to for what I have done so far:
At first, I thought it was a nothing but a preview bug, however, in a real project with a similar router hierarchy, same issue occurs.
I was expecting to see the color change as below when changing route from authentication to activity and standby views...perhaps it may be a bug, or I might have not used the router correctly. Please help!!