Comments (2)
You are not updating self.route
match &self.route {
BlogRoute::Root => self.render_root(),
BlogRoute::Post(post) => self.render_post(),
}
You want to render render_post
but I cannot find any self.route =
you are not changing self.route
, you are sending messages to parent which will set route
property correctly.
But you do not update self.route
on property changes.
Add this to blog.rs into Component to make sure self.route is updated when parent updated it route property.
fn change(&mut self, props: Self::Properties) -> ShouldRender {
self.route = props.route;
true
}
from yew_router.
Thanks so much, this helped a lot
from yew_router.
Related Issues (20)
- Fragment route not working HOT 15
- Switch derive macro doesn't handle type parameters
- Allow paths and queries to exist after a fragment
- Minimal route derive HOT 9
- Route state field should be just T HOT 2
- Only allow route: T: Switch in Props to Anchor and Button components.
- Change type parameter for state value from T to STATE
- js-sys/web-sys parallel implementation HOT 1
- minimal example fails to build HOT 7
- v0.8.0 fails to build with wasm-pack HOT 10
- RouterAnchor does not generate `href` for <a>
- Add support for web-sys HOT 1
- Code generated by `Switch` derive macro depends on evaluation order of tuple constructor arguments HOT 4
- cargo clippy failed for web-sys feature HOT 6
- Lost history when refresh page(web_sys) HOT 4
- [docs.rs] docs.rs failed to build yew-router-0.10.0
- Adding yew-router to cargo.toml breaks build HOT 2
- page not found after refresh browser HOT 2
- This repo is duplicative/confusing 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 yew_router.