@samitouri / QOS-React / commits / 5d153c9dbe

Don't call sCU with null props (#8633)

I missed this case in 8613 and it broke the triangle demo.

Sebastian Markbåge committed Dec 22, 2016 at 15:47 UTC 5d153c9dbe7380ade7d34ba831bf551e28e7cac6
1 file changed +1
src/renderers/shared/fiber/ReactFiberBeginWork.js
+1
@@ -194,6 +194,7 @@ module.exports = function<T, P, I, TI, C, CX>(
194 } else if (nextProps === null || memoizedProps === nextProps || (
195 // TODO: Disable this before release, since it is not part of the public API
196 // I use this for testing to compare the relative overhead of classes.
197 + memoizedProps !== null &&
198 typeof fn.shouldComponentUpdate === 'function' &&
199 !fn.shouldComponentUpdate(memoizedProps, nextProps)
200 )) {