Closed blorbb closed 5 months ago
First off, I just wanted to say thank you for taking the time to write this up!!
I think you did a good job explaining how/why/when one would use web_sys
with Leptos.
For Discussion:
I do wonder though whether dealing with web_sys / js_sys tasks are common enough that this should be near the end of Part 1 of the book??
Basically, is knowledge about web_sys
& js_sys
required for building a full, production-level CSR app?
If so, we should probably move this section to part 1, which is all about building UI's with Leptos..
What do you guys think..??
P.S. in terms of formatting.. there isn't a formal formatter that I/we have been using. What I've been doing personally is just putting each individual sentence on a new line - I think it makes it easier to reference particular sentences in discussions (and also gives you visual feedback if your sentences get really long, like mine sometimes do 😋 ).
looking at the discord, this seems semi-common so I'll move it to the end of part 1. I'll remove the advanced section too for now, since there aren't any topics in it.
(@diversable actually did you mean end of part 1 as in like after section 11, or the end of section "3. Part 1: ..."? I can move it again if you think it'll fit better after section 11)
(@diversable actually did you mean end of part 1 as in like after section 11, or the end of section "3. Part 1: ..."? I can move it again if you think it'll fit better after section 11)
Apologies - I should have been more clear. I meant right at the end of Part 1, after the "metadata" page. So, the reader gets the basics of Leptos down, and then gains some familiarity with the ecosystem libraries (eg. web_sys) needed to make more complex, real-world UI's work by reading your new page.
Your new content fits well with another new page I'm developing right now which uses web_sys
in the example - eventually, both your content and mine would go into a new section at the end of Part 1 tentatively titled "Complex UI's with Leptos".
But I'll make the change to add the section header and all that once I've finished the other page. For now, your content stands fine on its own :)
Does that make sense to you?
Should be ready now, thanks for helping out!
Just thought to add this after I spent way too long figuring out web-sys :). I'm not 100% sure that everything I've mentioned here is true, so please point out any errors you may find.
Covers part of #22 and starts on #8
I'm not sure if this should be part of the advanced section - feel free to request changes if you think it would fit better somewhere else, or if you want to change the text on the advanced intro page.
Some extra notes:
web_sys::HtmlElement
actually cheap? I tried to look at the source code but I can't tell what's happening, everything is a macro.Also, feel free to make any minor nitpicks, I'm happy to make any tiny changes (+ improve my writing!)