I can't find reference to support for height and width as a percentage value -- the height and width documentation incorrectly says right at the beginning -- "All dimensions in React Native are unitless, and represent density-independent pixels."
As somebody new to react-native, that's a pretty big oversight in the documentation. After reading that I was surprised to see that support was added for percentage values over two years ago. There was a comment on the issue in the react-native repository kind of hinting at the question "why hasn't this been added to the documentation yet":
Has this been changed recently? I have working code, that uses '100%' in width and height. I also came across Yellobox.js in the RN repo that uses percentages (https://github.com/facebook/react-native/blob/9f33fe258312987f490cc0f3a71c0c4f93494e7f/Libraries/ReactNative/YellowBox.js). However, I can't find any mention of this in the documentation
Is this unintended or is the documentation lacking?
Originally posted by @andrioid in react/react-native#364 (comment)
I can't find reference to support for height and width as a percentage value -- the height and width documentation incorrectly says right at the beginning -- "All dimensions in React Native are unitless, and represent density-independent pixels."
As somebody new to react-native, that's a pretty big oversight in the documentation. After reading that I was surprised to see that support was added for percentage values over two years ago. There was a comment on the issue in the react-native repository kind of hinting at the question "why hasn't this been added to the documentation yet":