You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// margin is a style prop and (as far as the docs go) belongs in a style prop.constMyApp=()=><Viewmargin="10 10"/>// Above throws (when rendered) JSON value '0 10' of type NSString cannot be converted to NSNumber// Above behavior was expected with following:constMyOtherApp=()=><Viewstyle={{margin: "10 10"}}/>
Why is margin even being looked at by RN?
This happens with other style props as well. For instance padding.
I'll chime in to say that this is an issue outside of styled components in setting props that collide with "layout props". And why do layout props exist as props outside of styles in the first place? There is no discussion of this feature besides the docs outlining them -- at least as far as I can tell. Is it kosher to use these props to set styles and, more importantly, it is a side-effect or was this intended?
I'll chime in to say that this is an issue outside of styled components in setting props that collide with "layout props".
And why do layout props exist as props outside of styles in the first place? There is no discussion of this feature besides the docs outlining them -- at least as far as I can tell. Is it kosher to use these props to set styles and, more importantly, it is a side-effect or was this intended?
I wouldn't depend on these remaining exposed, you should go through the style prop. It is a side effect of how the properties are implemented as far as I know.
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.
Activity
[-]View style props[/-][+]Layout Props passes outside of `style` throw[/+][-]Layout Props passes outside of `style` throw[/-][+]Layout Props passed outside of `style` throw[/+]ssomnoremac commentedon Feb 21, 2017
I'll chime in to say that this is an issue outside of styled components in setting props that collide with "layout props". And why do layout props exist as props outside of styles in the first place? There is no discussion of this feature besides the docs outlining them -- at least as far as I can tell. Is it kosher to use these props to set styles and, more importantly, it is a side-effect or was this intended?
brentvatne commentedon Feb 22, 2017
I wouldn't depend on these remaining exposed, you should go through the
styleprop. It is a side effect of how the properties are implemented as far as I know.f0rr0 commentedon Mar 6, 2017
@brentvatne shouldn't this be in the docs? In case of naming collision, user supplied props get over ridden with the layout ones.
hramos commentedon Jul 25, 2017
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.