3 ms·
I think I agree. I commented a while back I prefer components that don’t reset state based on props anyway. Use state as little as possible and keep things pur
by quickthrower2 4y ago
I think I agree. I commented a while back I prefer components that don’t reset state based on props anyway.
Use state as little as possible and keep things pure and you probably won’t need this.
Example: date picker only keeps the open/close ui state of the picker. The date is a prop and date change is an event.
Instead of original date being a prop. Current date being local state.