Giter Club home page Giter Club logo

Comments (3)

Nickersoft avatar Nickersoft commented on May 30, 2024

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.

frzi avatar frzi commented on May 30, 2024

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 Routes 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.

frzi avatar frzi commented on May 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.