4 ms·
Also in the future this pattern will be faster thanks to React not having to maintain an internal instance for such components. (How's that different from just
by danabramov 11y ago
Also in the future this pattern will be faster thanks to React not having to maintain an internal instance for such components.
(How's that different from just a function? It shows up as separate thing in React DevTools, it can have default props or, in the future, shouldComponentUpdate (or built-in memoization strategy?), you can potentially later change it to be stateful without rewriting consuming code, etc)