fix links
This commit is contained in:
1 parent
c5e43dbef6
commit
9a5913cd74
2 files changed
+3
-3
No files matched your search
@@ -176,7 +176,7 @@ fn App() -> Element {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Hooks are sensitive to how they are used. To use hooks, you must abide by the ["rules of hooks"](https://dioxuslabs.com/learn/0.7/reference/hooks#rules-of-hooks):
|
Hooks are sensitive to how they are used. To use hooks, you must abide by the ["rules of hooks"](https://dioxuslabs.com/learn/0.7/essentials/basics/hooks#rules-of-hooks):
|
||||||
|
|
||||||
- Hooks can only be called in the body of a component or another hook. Not inside of another expression like a loop, conditional or function call.
|
- Hooks can only be called in the body of a component or another hook. Not inside of another expression like a loop, conditional or function call.
|
||||||
- Hooks should start with "use\_"
|
- Hooks should start with "use\_"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
You will often need to move state around between your components. Dioxus provides three different ways to pass around state:
|
You will often need to move state around between your components. Dioxus provides three different ways to pass around state:
|
||||||
|
|
||||||
1. Just pass your values as [props](https://dioxuslabs.com/learn/0.7/reference/component_props):
|
1. Just pass your values as [props](https://dioxuslabs.com/learn/0.7/essentials/ui/components#component-properties):
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
# use dioxus::prelude::*;
|
# use dioxus::prelude::*;
|
||||||
@@ -30,7 +30,7 @@ fn IncrementButton(mut count: Signal<i32>) -> Element {
|
|||||||
|
|
||||||
This is the most common way to pass state around. It is the most explicit and local to your component. Use this when it isn't overly annoying to pass around a value.
|
This is the most common way to pass state around. It is the most explicit and local to your component. Use this when it isn't overly annoying to pass around a value.
|
||||||
|
|
||||||
2. Use [use_context](https://dioxuslabs.com/learn/0.7/reference/context) to pass state from a parent component to all children:
|
2. Use [use_context](https://dioxuslabs.com/learn/0.7/essentials/basics/context) to pass state from a parent component to all children:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
# use dioxus::prelude::*;
|
# use dioxus::prelude::*;
|
||||||
|
|||||||
Reference in new issue
Block a user