chinedufn / percy

Build frontend browser apps with Rust + WebAssembly. Supports server side rendering.
https://chinedufn.github.io/percy/
Apache License 2.0
2.28k stars 84 forks source link

Better 404 handling in isomorphic app #129

Open mathiversen opened 5 years ago

mathiversen commented 5 years ago
chinedufn commented 5 years ago

Ah thanks for pointing this out!

AxelNilsson commented 3 years ago

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(),
        }
    }
}