-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
RN 0.54 - Stylesheet Flow types incompatible with spread operator #18277
Labels
Comments
Unfortunately, due to a bug in Flow, as we tighten the types of the stylesheets, they no longer support being spread into. My recommendation is to create a second style that is just fonts.BnpSansCondensed and pass your component an array containing both styles. The good news is that flow will start enforcing that only view styles can be passed to view, and only text styles can be passed to text. cc @samwgoldman |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi everyone, since the last react-native update, all my Stylesheet files are generating flow errors because of the spread Operator. Can someone help me resolve it ?
Environment
OS: macOS High Sierra 10.13.3
Node: 8.6.0
Yarn: 1.3.2
npm: 5.3.0
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: 0.54.0 => 0.54.0
Expected Behavior
No flow error, recognizing spread.
Actual Behavior
Steps to Reproduce
Just use a spread operator in a Stylesheet definition.
The text was updated successfully, but these errors were encountered: