feat: implement type magic to allow strings, format args, and other types directly in rsx (#550)

* feat: implement type magic

* chore: undo example

* fix: let tests pass

* chore: add generic to allow any nesting of iterators

* Chore: remove comments

* chore: update rsx usage

* chore: use cleaner version of generic IntoVnode

* chore: don't derive default for lfietimed thing

* chore: remove latent comment

* fix: accept a third parameter
This commit is contained in:
Jon Kelley authored and GitHub committed 2022-09-12 22:49:04 -07:00
1 parent 38e8745db9
commit 67dc6e6017
7 files changed
+80 -100

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ fn test_borrowed_state() {
}
fn Parent(cx: Scope) -> Element {
let value = cx.use_hook(|| String::new());
let value = cx.use_hook(String::new);
cx.render(rsx! {
div {
+1 -1
View File
@@ -157,7 +157,7 @@ fn create_components() {
fn Child<'a>(cx: Scope<'a, ChildProps<'a>>) -> Element {
cx.render(rsx! {
h1 {}
div { {&cx.props.children} }
div { &cx.props.children }
p {}
})
}