yew icon indicating copy to clipboard operation
yew copied to clipboard

Tutorial uses String not AttrValue

Open ydirson opened this issue 2 years ago • 1 comments

This is about: Inaccurate/misleading documentation (e.g. technically incorrect advice)

Problem

In this step of the tutorial, a struct is defined with String fields, and in later step those structs are used as component properties.

This looks like Anti-pattern #1. Shouldn't they be made AttrValues instead?

ydirson avatar Dec 21 '23 00:12 ydirson

The problem lies in the fact that AttrValue (implicit_clone::unsync::IString) does not implement Deserialize, which is required to parse the fetch. It could be implemented manually, but the cost-benefit of doing so would need to be considered.

juandevlife avatar May 14 '25 23:05 juandevlife