Synphonyte / leptos-use

Collection of essential Leptos utilities inspired by React-Use / VueUse / SolidJS-USE
https://leptos-use.rs/
Apache License 2.0
309 stars 66 forks source link

use_cookie example not reproducible #150

Closed JosiahParry closed 1 month ago

JosiahParry commented 1 month ago

The use_cookie references a trait FromToStringCodec this is not hyperlinked in the docs: https://docs.rs/leptos-use/latest/leptos_use/fn.use_cookie.html

below the example code it references "the codec chapter".

From there, it looks like there is an issue rendering the docs book

image

the link for FromToStringCodec is broken: https://github.com/Synphonyte/leptos-use/blob/main/src/utils/codecs/string/from_to_string.rs

It would be great if the documentation for this handy function provided a reproducible example. As it stands, there is no clear way to use this function—which is a bummer because it looks so useful!

maccesch commented 1 month ago

We recently moved all the codecs into its own crate called codee. Leptos 0.7 resources now use that crate as well.

I guess we forgot to update the chapter in the book. Sorry about that!

JosiahParry commented 1 month ago

Gocha! So including codee to Cargo.toml is the way forward, ya?

maccesch commented 1 month ago

You can find the corrected chapter now here: https://github.com/Synphonyte/leptos-use/blob/main/docs/book/src/codecs.md