Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on React: You Might Not Need an Effect. Parent comment
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.
There are no comments on this comment yet.
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.