@ -10,4 +10,6 @@ Just as you can bind to properties of DOM elements, you can bind to component pr
Now, when the user interacts with the keypad, the value of `pin` in the parent component is immediately updated.
Now, when the user interacts with the keypad, the value of `pin` in the parent component is immediately updated.
> Use component bindings sparingly. It can be difficult to track the flow of data around your application if you have too many of them, especially if there is no 'single source of truth'.
> Use component bindings sparingly. It can be difficult to track the flow of data around your application if you have too many of them, especially if there is no "single source of truth".
>
> In this particular case, a better approach would be: the Keypad component could dispatch events for every numerical key, and it could be responsibility of the parent to concatenate the entire pin in a `let pin` variable, making it a single source of truth. This would make the Keypad component more generic and reusable.