finish router refrence
This commit is contained in:
1 parent
07446386e6
commit
b5a2f0d6cb
61 files changed
+676
-1908
No files matched your search
@@ -13,7 +13,7 @@ First, we need an actual page to route to! Let's add a homepage component:
|
||||
{{#include ../../examples/first_route.rs:home}}
|
||||
```
|
||||
|
||||
## To Route or Not to Route
|
||||
## Creating Routes
|
||||
|
||||
We want to use Dioxus Router to separate our application into different "pages".
|
||||
Dioxus Router will then determine which page to render based on the URL path.
|
||||
@@ -35,7 +35,7 @@ you enter a different path for the URL, nothing should be displayed.
|
||||
This is because we told Dioxus Router to render the `Home` component only when
|
||||
the URL path is `/`.
|
||||
|
||||
## What if a Route Doesn't Exist?
|
||||
## Fallback Route
|
||||
|
||||
In our example, when a route doesn't exist Dioxus Router doesn't render anything. Many sites also have a "404" page when a path does not exist. Let's add one to our site.
|
||||
|
||||
|
||||
@@ -22,6 +22,6 @@ If we need a link to an external page we can do it like this:
|
||||
{{#include ../../examples/external_link.rs:component}}
|
||||
```
|
||||
|
||||
[`External`]: https://docs.rs/dioxus-router-core/latest/dioxus_router_core/navigation/enum.NavigationTarget.html#variant.External
|
||||
[`Internal`]: https://docs.rs/dioxus-router-core/latest/dioxus_router_core/navigation/enum.NavigationTarget.html#variant.Internal
|
||||
[`NavigationTarget`]: https://docs.rs/dioxus-router-core/latest/dioxus_router_core/navigation/enum.NavigationTarget.html
|
||||
[`External`]: https://docs.rs/dioxus-router-core/latest/dioxus_router/navigation/enum.NavigationTarget.html#variant.External
|
||||
[`Internal`]: https://docs.rs/dioxus-router-core/latest/dioxus_router/navigation/enum.NavigationTarget.html#variant.Internal
|
||||
[`NavigationTarget`]: https://docs.rs/dioxus-router-core/latest/dioxus_router/navigation/enum.NavigationTarget.html
|
||||
Reference in new issue
Block a user