it almost lives?

This commit is contained in:
Evan Almloff committed 2023-07-25 18:14:48 -07:00
1 parent d637ef187c
commit 5f0dd3af3e
43 files changed
+506 -244

No files matched your search

+3 -3
View File
@@ -26,7 +26,7 @@ Unlike other routers in the Rust ecosystem, our router is built declaratively. T
```rust, no_run
rsx!{
// All of our routes will be rendered inside this Router component
Router {
Router::<Route> {
// if the current location is "/home", render the Home component
Route { to: "/home", Home {} }
// if the current location is "/blog", render the Blog component
@@ -43,7 +43,7 @@ We can fix this one of two ways:
```rust, no_run
rsx!{
Router {
Router::<Route> {
Route { to: "/home", Home {} }
Route { to: "/blog", Blog {} }
// if the current location doesn't match any of the above routes, render the NotFound component
@@ -56,7 +56,7 @@ rsx!{
```rust, no_run
rsx!{
Router {
Router::<Route> {
Route { to: "/home", Home {} }
Route { to: "/blog", Blog {} }
// if the current location doesn't match any of the above routes, redirect to "/home"
+3 -3
View File
@@ -28,7 +28,7 @@ Ao contrário de outros roteadores no ecossistema Rust, nosso roteador é constr
```rust, no_run
rsx!{
Router {
Router::<Route> {
Route { to: "/home", Home {} }
Route { to: "/blog", Blog {} }
}
@@ -43,7 +43,7 @@ Podemos corrigir isso de duas maneiras:
```rust, no_run
rsx!{
Router {
Router::<Route> {
Route { to: "/home", Home {} }
Route { to: "/blog", Blog {} }
Route { to: "", NotFound {} }
@@ -55,7 +55,7 @@ rsx!{
```rust, no_run
rsx!{
Router {
Router::<Route> {
Route { to: "/home", Home {} }
Route { to: "/blog", Blog {} }
Redirect { from: "", to: "/home" }