mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-07 22:40:55 +08:00
Summary: Returning an object that doesn't have all the required properties from `getItemLayout` doesn't cause a flow error (maybe because we are using `createAnimatedComponent`) and caused ALL items to be rendered which caused perf issues that were hard to debug (typo lenght -> length -_-). This adds a simple warning in DEV mode using checkPropTypes. **Test plan** Tested in RNTester by passing a bad `getItemLayout` function.  Closes https://github.com/facebook/react-native/pull/14111 Differential Revision: D5283942 Pulled By: sahrens fbshipit-source-id: 8909532dfddd8628b7fb3380c198f0dfa88f240a