leptos-rs / leptos

Build fast web applications with Rust.
https://leptos.dev
MIT License
15.28k stars 599 forks source link

docs: Add docs for `ToChildren` #2643

Closed spencewenski closed 1 week ago

spencewenski commented 2 weeks ago

As discussed in https://github.com/leptos-rs/leptos/discussions/2640, the ToChildren trait is useful to consumers who want to use the builder syntax. However, because it is currently annotated with #[docs(hidden)], it's not visible in docs and also not included in Jetbrains's auto-complete.

Add a doc comment for the ToChildren trait, including doc tests that demonstrate how to use the trait and how it compares to directly creating children.

spencewenski commented 1 week ago

Hey @gbj , I believe I resolved the issue that was causing the checks to fail. Can you re-run the workflow and review when you get a chance? Thanks!

benwis commented 1 week ago

LGTM. Thanks for the PR