3 ms·
No, because now you have 2 pieces of state to maintain and keep in sync. You must store `desired_column` and compute `current_column`. Otherwise you or someone
by erhaetherth 3y ago
No, because now you have 2 pieces of state to maintain and keep in sync.
You must store `desired_column` and compute `current_column`. Otherwise you or someone will try manipulating `current_column` to try to get the desired outcome, or worse, update one and not the other.
- lolinder 3y agoSo make current column a readonly computed property of the actual state, which is what TFA calls the Intent. What TFA discovered is that anchoring your state closer to the user input is valuable, but that insight doesn't remove functions from your toolbox.