-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
[v3] Multiple style arrays can no longer be passed to already styled children #450
Comments
Can you confirm that spreading styles here: <Text ref={ref} {...props} style={[styles.text, ...props.style]}> Will work? It's connected to how we handle styles due to |
Just tried that and it still doesn't work, it also has type errors |
How so? props.style is an array right? So you have something like this: <Text ref={ref} {...props} style={[styles.text, [styles.text, props.style]}> // pseudo code copied from component above |
I updated the AlertText to use this: <Text ref={ref} {...props} style={[styles.text, ...props.style]}> The ...
<AlertText ref={ref} {...props} style={styles.text}>
... But for some reason passing in For more context AlertText and AlertTitle |
Thanks for the clarification. I plan to remove any style limits in the next beta release, so most likely it will be fixed anyway. Will double check before the release |
Thank you, I'll give it another go with the next release and report back 👍 |
Description
You can no longer pass multiple style arrays down as props e.g
// AlertText.tsx
// AlertTitle.tsx
The styles from the parent title component are no longer applied.
Steps to Reproduce
[styles.component, props.style]
[styles.parent, props.style]
Snack or Repository Link (Optional)
No response
Unistyles Version
3.0.0-beta.4
React Native Version
0.76.3
Platforms
Android, iOS
Expo
Yes
The text was updated successfully, but these errors were encountered: