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

[BUG] style prop does not conform to standard View style prop #80

Open
dominictobias opened this issue Aug 21, 2024 · 0 comments
Open
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@dominictobias
Copy link
Contributor

dominictobias commented Aug 21, 2024

Describe the bug

Minor but the prop and handling of style should be style?: StyleProp<ViewStyle> | undefined

This allows the style to be an array like other RN Views.

We can spread the style into a new object each render but this is less efficient as React caches static styles so style={[staticStyles, { ...dynamicStyles... }] is more efficient than spreading and the static styles don't need to get sent over the JS->Native bridge every time.

@dominictobias dominictobias added the needs-grooming Has not been reviewed by codeowners for scope/validation label Aug 21, 2024
@Jmilham21 Jmilham21 added bug Something isn't working good first issue Good for newcomers and removed needs-grooming Has not been reviewed by codeowners for scope/validation labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants