4 ms·
React doesn't have to be O(N). You can short circuit rendering with shouldComponentUpdate checks.
by timdorr 11y ago
React doesn't have to be O(N). You can short circuit rendering with shouldComponentUpdate checks.
- grayrest 11y agoshouldComponentUpdate only prunes the size of the vdom tree, updates are still O(n_virtual_dom). I've always thought this was an advantage compared to alternative approaches I know about since pruning the size of the vdom tends to be fairly easy compared to, say, optimizing a KVO chain.