4 ms·
`setState(...)` is not idiomatic in JavaScript.
by pgt 7y ago
`setState(...)` is not idiomatic in JavaScript.
- dhucerbin 7y agoI'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.