mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
64c8f22343
Summary: I ran into confusion (#12581) because the docs for TouchableOpacity stated that it doesn't change the view hierarchy, but in fact it does, and the docs are just out of date. - [20 Feb 2015](https://github.com/facebook/react-native/blob/efae175a8e1b05c976cc5a1cbd492da71eb3bb12/Libraries/Components/Touchable/TouchableOpacity.js#L21) Docs correctly reflected that the component was cloned so didn't affect hierarchy - [25 Jul 2015](https://github.com/facebook/react-native/commit/725053acfeba4c7f2a21ac47ae8100588a710476) Component was changed to being wrapped but docs weren't updated. Went to correct this in the docs and noticed they were a bit inconsistent with each other, so have made them more unified. Each one now clearly warns about: - If it adds a view to the hierarchy, which will affect layout. - If it can only accept a single child. Closes https://github.com/facebook/react-native/pull/12583 Differential Revision: D4619837 Pulled By: ericvicenti fbshipit-source-id: 4d1becd9f290cefcb4548a5ea2878be2d2c315fa