Giter VIP home page Giter VIP logo

Comments (7)

arctic-hen7 avatar arctic-hen7 commented on May 14, 2024

Now that that PR has been merged, there are a few minor changes that need to take place for this to work with regards to setting global variables.

from perseus.

arctic-hen7 avatar arctic-hen7 commented on May 14, 2024

Okay, fixing this seems to be just about impossible until we can get the user's Routes into the RouteVerdict enum somehow. Right now, that's done with context, which doesn't work because it's not in a reactive scope, and global variables can't be used because they need to be generated in the CLI subcrates with macros. If the Route trait's method match_route took &self as a parameter, this would enable the very efficient solving of just about all these problems, which I've proposed here. Until there's some action there, this likely won't go anywhere. Any other solutions would be greatly appreciated!

from perseus.

arctic-hen7 avatar arctic-hen7 commented on May 14, 2024

With #12 dealt with, this is now a single problem in the router, as a verdict is successfully generated, but for some reason Sycamore then doesn't run the logic to match that verdict and actually render a new page. This results in no exceptions and no identifiable error messages.

from perseus.

arctic-hen7 avatar arctic-hen7 commented on May 14, 2024

With #2 closed and major changes to the app shell, this bug is now manifested in its third iteration: locale detection will call Sycamore's navigate function, which causes a blank screen, and all other routes are treated as external and reload the entire page. Neither of these behaviors are desirable, but the first priority should now be to have all routes treated as internal and thus to simplify this down to one problem of router execution, as it was in its previous version.

from perseus.

arctic-hen7 avatar arctic-hen7 commented on May 14, 2024

Okay, the new issue of not intercepting click events seems to be caused by the fact that the Sycamore router only handles click events for its children, and Perseus simply renders an empty template, hydrating to an element that the router doesn't control. I'll work on a fix for this now, and see what happens to the other part of this bug.

from perseus.

arctic-hen7 avatar arctic-hen7 commented on May 14, 2024

Okay, we are back to one bug! Links now behave correctly as in an SPA, and now it's just that the closure passed to Router is never properly called.

from perseus.

arctic-hen7 avatar arctic-hen7 commented on May 14, 2024

Thank you @lukechu10 for all your help on this one! Greatly appreciated!

from perseus.

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.