leptos-rs / book

The home for the Leptos book, which can be found deployed at https://book.leptos.dev
MIT License
73 stars 60 forks source link

Add `.as_ref()` to Params example #10

Closed Andrewp2 closed 9 months ago

Andrewp2 commented 9 months ago

Added .as_ref() to make example compile.

I didn't check if the below example

let id = move || { params.with(|params| params.get("id").cloned()) };

needed an .as_ref(), but I don't think it does.