percy
percy copied to clipboard
Better 404 handling in isomorphic app
- There seems to be a bug when navigating to the catch_all route but not contributors, ex. localhost:7878/test. The current implementation panics using both rocket and actix as server.
- Rocket currently has 404 for unknown routes and this should be added to the actix example as well.
Ah thanks for pointing this out!
Here's an example of what I did using the isomorphic example.
lib.rs
impl App {
pub fn render(&self) -> VirtualNode {
match self.router.view(self.store.borrow().path()) {
Some(route) => route,
None => NotFoundView::new().render(),
}
}
}