clever-components
clever-components copied to clipboard
RFC: About 2 way data binding and one direction data flow...
DRAFT (needs to be written in full details)
We do this in components that handle form controls/inputs
- public prop foo
- private prop _foo
- update foo => _foo
- input value=_foo
- @input => _foo
This was inspired by 1 way data flow and "never update your own props".
- It doesn't seem necessary (I need to check this with other people).
- It's verbose and cumbersome to write.
Instead, we're considering doing simply this:
- public prop foo
- input value=foo
- @input => foo
But it doesn't really work. We're still in a situation were reseting name from the parent wont work.
https://lit-and-friends.slack.com/archives/C03PF4L4L/p1658527483233609