mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Summary: We cannot call `parentView.getChildCount()` directly, we must get the child count through the ViewManager: A simple `Log.e` call shows: ``` MountingManager: parentView.getChildCount(): 0 // viewGroupManager.getChildCount(parentView): 7 ``` This difference does not occur for ALL views, but it occurs for... enough that this will crash on basically ~every screen, at least on navigation when all views are removed. Theory about why this is happening: some ViewGroup types compute childCount differently, especially if we do some sort of custom child management for some view type? By coercing to `T` which the ViewManager does, we call getChildCount on the correct class type. This is just a hypothesis, though. But the failing views are all `View`s and it does look like `ReactClippingViewManager` has custom `getChildCount` logic, so that's likely the answer. There's no such thing as an easy diff! Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D21750097 fbshipit-source-id: 3d87d8f629a0c12101658050e57e09242dfc2a8c
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.