3 ms·
Normally syntactic sugar is fine and has a near-zero cost, but in this case I don't think that's actually true. Given the way hooks are structured, if I want t
by fastball 5y ago
Normally syntactic sugar is fine and has a near-zero cost, but in this case I don't think that's actually true.
Given the way hooks are structured, if I want to use both `setState` and `extendState` in a `useCallback`, I'd need to pass both to the dependency array, which is just extra effort (which defeats the purpose of the syntactic sugar imo).