Agnostic Layouts #2099
-
QuestionIs it possible to create a component ( in my case layout ) with children, but without any dependency, and still be able to update children's properties from the topmost ( parent of the layout ) component? ChildrenWithProps doesn't really help because you have to specify children's types and even their properties when you want to update. For example:
The issue here is that the layout shouldn't be aware of cilld property errors. What I've tried (optional)login.rs:
AuthLayout should contain only the view (html) and be able to accept children. LoginComp can have properties that we can update directly from login.rs Currently if |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In the |
Beta Was this translation helpful? Give feedback.
In the
AuthLayout
, you need to make sure to updateprops.children
in thechange
method.