prep for 0.7 release
This commit is contained in:
1 parent
1b81d89f0b
commit
8f85114d46
40 files changed
+86
-86
No files matched your search
@@ -15,7 +15,7 @@
|
||||
[discord-url]: https://discord.gg/XgGxMSkvUM
|
||||
|
||||
[Website](https://dioxuslabs.com) |
|
||||
[Guides](https://dioxuslabs.com/learn/0.6/) |
|
||||
[Guides](https://dioxuslabs.com/learn/0.7/) |
|
||||
[API Docs](https://docs.rs/dioxus-hooks/latest/dioxus_hooks) |
|
||||
[Chat](https://discord.gg/XgGxMSkvUM)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
- use_memo
|
||||
- use_coroutine
|
||||
|
||||
Unlike React, none of these hooks are foundational since they all build off the primitive `use_hook`. You can extend these hooks with [custom hooks](https://dioxuslabs.com/learn/0.6/cookbook/state/custom_hooks) in your own code. If you think they would be useful for the broader community, you can open a PR to add your hook to the [Dioxus Awesome](https://github.com/DioxusLabs/awesome-dioxus) list.
|
||||
Unlike React, none of these hooks are foundational since they all build off the primitive `use_hook`. You can extend these hooks with [custom hooks](https://dioxuslabs.com/learn/0.7/essentials/advanced/custom_hooks) in your own code. If you think they would be useful for the broader community, you can open a PR to add your hook to the [Dioxus Awesome](https://github.com/DioxusLabs/awesome-dioxus) list.
|
||||
|
||||
## State Cheat Sheet
|
||||
|
||||
@@ -62,7 +62,7 @@ The core hooks library doesn't provide hooks for persistent state, but you can e
|
||||
| State | Sharable | Example |
|
||||
| ---------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------- |
|
||||
| [`use_persistent`](https://github.com/DioxusLabs/sdk/tree/master/examples/storage) | ❌ | `use_persistent("unique_key", move \|\| initial_state)` |
|
||||
| [`Router<Route> {}`](https://dioxuslabs.com/learn/0.6/router) | ✅ | `#[derive(Routable, Clone, PartialEq)] enum Route { #[route("/user/:id")] Homepage { id: u32 } }` |
|
||||
| [`Router<Route> {}`](https://dioxuslabs.com/learn/0.7/router) | ✅ | `#[derive(Routable, Clone, PartialEq)] enum Route { #[route("/user/:id")] Homepage { id: u32 } }` |
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
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.6/reference/component_props):
|
||||
1. Just pass your values as [props](https://dioxuslabs.com/learn/0.7/reference/component_props):
|
||||
|
||||
```rust
|
||||
# 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.
|
||||
|
||||
2. Use [use_context](https://dioxuslabs.com/learn/0.6/reference/context) to pass state from a parent component to all children:
|
||||
2. Use [use_context](https://dioxuslabs.com/learn/0.7/reference/context) to pass state from a parent component to all children:
|
||||
|
||||
```rust
|
||||
# use dioxus::prelude::*;
|
||||
|
||||
Reference in new issue
Block a user