Comments (3)
Actually, upon further testing, it seems there are times where the routes with optional params aren't matching at all, regardless of whether there is a trailing slash
from swiftui-router.
Oof, sorry for the inconvenience! Well caught! A new branch has been created that attempts to fix the problem addressed in your first post. If you'd like, you can test this by changing the package in Xcode to use the fix/issue-40
branch.
Edit: Scratch that, this seems to break other stuff. 🥲
As for the second problem, I presume this is the same problem as addressed in issue #39. Which I'm having some trouble with when it comes to consistently reproducing. So far my only hunch is that some weird optimization in SwiftUI 3 kicks in at a random time and decides to not call the body
of some Route
s inside a SwitchRoutes
- probably because the SwiftUI diffing engine determines that nothing has changed, and thus doesn't bother requesting a new body from the Route
... Which is problematic considering the logic of path matching is done inside the body
. 😞
But the key problem here is that I'm unable to consistently reproduce this problem... Even when making this example I only encountered this problem once, and have been unable to reproduce it since. So if anyone has a sample project or knows the steps to consistently activate this odd behaviour, I'd be most grateful 🙏
from swiftui-router.
Okay let's try that again. The first addressed issue should be fixed in the branch fix/issue-40
. You can tell Xcode to use this branch for the SwiftUI Router package if you want to test it out. Will do some testing before merging this to main.
from swiftui-router.
Related Issues (20)
- Nested routes without parent being rerendered on child navigation HOT 2
- How to use? HOT 2
- Set path on app launch HOT 2
- view init twice when navigate
- How to navigate to any page HOT 2
- Navigate navigates into void sometimes HOT 3
- Flexible nested navigation HOT 2
- SwiftUIRouter using NavigationLink HOT 6
- Can't revisit a page HOT 2
- Full screen navigation without ignoring safe area
- Type safe routes HOT 4
- State of views from the back stack is not saved
- Able to switch to another tab then push to a certain view under navigation view then finally present a modal? HOT 1
- Switch between flows HOT 3
- Full screen navigation above tabView HOT 4
- `.opacity` transition not working HOT 2
- Keep paths loaded in memory for performance (e.g. in tab bar) HOT 2
- xcodebuild error HOT 2
- Navigating to a blank screen issue HOT 2
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 swiftui-router.