Re:Thinking in React Hooks
by pgt on Thursday December 12, 2019 @06:33PM
(#21777714)
`setState(...)` is not idiomatic in JavaScript.
[ Parent
| on HN ]
I'm not sure how far back you want to go, but `this.set` is used in most frontend frameworks, starting around knockout and backbone. You had object which managed state for you (then it was model, today it is component) and it had some setter method.