Open petehunt opened 10 years ago
Adding this function will tell react not to update component if the props.fill didn't change? I thought react internals is supposed to figure this out?
It will but in this case react makes the wrong perf trade off. For the common case it is faster to just render and diff the result rather than deep equal the "model" since you often render less data than what's in your model. For this case you can check the model in expensively.
So it was correct, but react just couldn't diff it fast enough to keep up because this is not the common use case.
add shouldComponentUpdate perf hook which fixes the bug.