docs: update local examples and docs to support new syntaxes

This commit is contained in:
Jonathan Kelley committed 2021-12-15 15:56:53 -05:00
1 parent e495b09bf1
commit 4de16c4779
118 files changed
+520 -1154

No files matched your search

+2 -2
View File
@@ -16,7 +16,7 @@ This is moderately efficient because the fields of the map are moved, but the da
However, if you used similar approach with Dioxus:
```rust
let (map, set_map) = use_state(cx, || HashMap::new());
let (map, set_map) = use_state(&cx, || HashMap::new());
set_map({
let mut newmap = map.clone();
newmap.set(key, value);
@@ -36,7 +36,7 @@ uses the same memoization on top of the use_context API.
Here's a fully-functional todo app using the use_map API:
```rust
static TodoList: FC<()> = |cx, props|{
static TodoList: Component<()> = |cx, props|{
let todos = use_map(cx, || HashMap::new());
let input = use_ref(|| None);