Comments (7)
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.
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.
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.
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.
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.
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.
Thank you @lukechu10 for all your help on this one! Greatly appreciated!
from perseus.
Related Issues (20)
- Nested static aliases fail with exporting HOT 8
- Cannot deploy a perseus app using beta.19 HOT 2
- Populate `lang` attribute on root `html` element when translator is present. HOT 2
- Incremental generation is broken for a template named index in the beta.19 HOT 4
- Build state function with non-`Clone` state results in suboptimal compiler error HOT 3
- Using the translation feature as well as having global build state causes an error when the user navigates directly to the root page (or any valid page) when not including the locale in the path. HOT 1
- Failed to run `cargo install perseus-cli` without the `--locked` flag HOT 4
- Using the builder pattern `input().bind_value(...)` perseus panics HOT 5
- Using global state in a Capsule as well as a Template leads to unreachable code being reached at build-time HOT 2
- Vectors do not work in `ReactiveState` HOT 4
- [Router] [Bug] When using `.incremental_generation()`, you cannot navigate to a new route on the same page. HOT 3
- When trying to run a perseus app with docker, it gets: `Error: asset './dist/render_conf.json' not found in store` HOT 2
- Fail proceed 'perseus build' after upgraded to v0.4.1 HOT 3
- Build-time state can be user or "segment" specific, and it's actually easy to setup HOT 3
- Missing </body></html> HOT 1
- perseus-cli/0.4.2 crate is missing the tests folder HOT 3
- console_error_panic_hook HOT 2
- State amalgamation with different types HOT 1
- The command `Perseus serve -w` is very slow when listening to a large number of files. HOT 1
- Bootstrap scrollspy support HOT 4
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 perseus.