-
-
Notifications
You must be signed in to change notification settings - Fork 684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
leptos_dom v2 #119
leptos_dom v2 #119
Conversation
This all seems reasonable to me, API-wise. One concern I have is that the distinction between view! { cx, <p>"Value: " {some_function()} "!"</p> } Translates into There are a few other small optimizations I can see (tag names can probably be But yeah, looks good for an API and keep on going! |
Yeah! This is for people who wanted to use the builder API without the macro. For the macro, it would only be using
This was my initial instinct too, 99% of nodes don't need to be
I totally agree on There are some questions, for example, when creating elements, should the context be collected at the begining: let div = div(cx); Or ar the end? let node = div().text("Hello").into_node(cx); Should I know for the macro this is a non issue, but for a builder, what would happen in this case: Let's say I have a function that returns an This can happen too if we just collect the |
Right, makes sense.
Also makes sense as a use case for the builder, and probably not a meaningful de-optimization: the cost of strings is in copying them across to JS-land, not in the allocation for
Well if you have mutable access you can push into a
Depends on when the |
b38328e
to
8fac1c5
Compare
…he same signal trigger but the parent runs before this child
…into leptos_dom_v2
…` for `Cow<'static, str>` opt
…into leptos_dom_v2
…into leptos_dom_v2
…time (because runtime already dropped)
…into leptos_dom_v2
This pull request addresses #116 .