Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS release crash with use "View.propTypes.style" for component style propTypes. #21223

Closed
XinQiXiao opened this issue Sep 20, 2018 · 3 comments
Labels
Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@XinQiXiao
Copy link

XinQiXiao commented Sep 20, 2018

Environment

OS: macOS High Sierra 10.13.6
Node: 7.6.0
Yarn: 1.7.0
npm: 4.1.2
Watchman: 3.3.0
Xcode: Xcode 9.4.1 Build version 9F2000
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: ^16.1.1 => 16.5.2
react-native: ^0.50.4 => 0.50.4

Description

In a custom component, propsType is used for specifying the props type of the component. No error was reported in the debug environment, but after release was packaged, it broke.

Code below

...
someComponent.propTypes = {
containerStyle: View.propTypes.style,
...
}
someComponent.defaultProps = {
containerStyle: null,
...
}
...

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.

The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@RSNara
Copy link
Contributor

RSNara commented Sep 24, 2018

How did you package the release?

Just a guess: Proptypes have a performance overhead. That may be the reason why you're seeing that View.propTypes is null with the release build of your app.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Oct 9, 2018
@react-native-bot
Copy link
Collaborator

I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

@facebook facebook locked as resolved and limited conversation to collaborators Oct 9, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants