leptos-rs / leptos

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

feat: `#[component]` now handles `impl Trait` by converting to generic type params, fix #2274 #2599

Closed MingweiSamuel closed 1 month ago

MingweiSamuel commented 1 month ago

Fix #2274 (for real)

Currently the Idents generated are just in the form __ImplTrait0, __ImplTrait1, etc. Maybe could base it off of the argument names, to improve error messages if there are bugs.

Book needs to be updated to remove this line: https://github.com/leptos-rs/book/blob/35c380ffc8f7d2e50ef21db97943138b3dba2728/src/view/03_components.md?plain=1#L233

gbj commented 1 month ago

Looks great -- Thanks very much!