fix: readme and examples syntax
This commit is contained in:
1 parent
f24aae8787
commit
3dc0e59876
102 files changed
+213
-1222
No files matched your search
@@ -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: Component<()> = |cx, props|{
|
||||
static TodoList: Component = |cx| {
|
||||
let todos = use_map(cx, || HashMap::new());
|
||||
let input = use_ref(|| None);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ impl<'a, P, T> UseStateA<'a, T> for Scope<'a, P> {
|
||||
/// Usage:
|
||||
///
|
||||
/// ```ignore
|
||||
/// const Example: Component<()> = |cx| {
|
||||
/// const Example: Component = |cx| {
|
||||
/// let counter = use_state(&cx, || 0);
|
||||
///
|
||||
/// cx.render(rsx! {
|
||||
|
||||
Reference in new issue
Block a user