feat: add an unhygenic render macro (#556)
* feat: add an unhygenic render macro * chore: use render instead of rsx!(cx,
This commit is contained in:
1 parent
0c48cb3601
commit
28fba42e7e
28 files changed
+158
-163
No files matched your search
+2
-2
@@ -101,7 +101,7 @@ fn example(cx: Scope) -> Element {
|
||||
// both of these are equivalent
|
||||
cx.render(rsx!("hello world"))
|
||||
|
||||
rsx!(cx, "hello world!")
|
||||
render!("hello world!")
|
||||
}
|
||||
```
|
||||
|
||||
@@ -235,7 +235,7 @@ use hooks to define state and modify it from within listeners.
|
||||
fn app(cx: Scope) -> Element {
|
||||
let name = use_state(&cx, || "world");
|
||||
|
||||
rsx!(cx, "hello {name}!")
|
||||
render!("hello {name}!")
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user