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

Passing style to Animated doesn't work on web #524

Open
terreng opened this issue Jan 25, 2025 · 1 comment
Open

Passing style to Animated doesn't work on web #524

terreng opened this issue Jan 25, 2025 · 1 comment
Milestone

Comments

@terreng
Copy link

terreng commented Jan 25, 2025

Description

Passing a style to an Animated.View or Animated.Text like so works on iOS but does not work on the web. On the web the style doesn't apply and it errors with Warning: Unsupported style property unistyles-7th2n. Did you mean unistyles7th2n?.

import { Animated } from 'react-native';
import { StyleSheet } from 'react-native-unistyles';

export const ExampleComponent = ({}) => {
  return (
    <Animated.Text style={styles.text}>Hello</Animated.Text>
  )
}

const styles = StyleSheet.create({
  text: {
    color: "green"
  }
});

Issue #512 is also related to passing styles to Animated.Text.

Steps to Reproduce

See above code sample or repo link below

Snack or Repository Link (Optional)

https://github.com/terreng/unistyles-issue-524-minimal-repro

Unistyles Version

3.0.0-beta.5

React Native Version

0.76.6

Platforms

Web

Expo

Yes

@jpudysz jpudysz added this to the 3.0.0-beta.6 milestone Jan 27, 2025
@jpudysz
Copy link
Owner

jpudysz commented Jan 27, 2025

Hey! Animated is not yet supported in beta.5. We've just added support for Reanimated.

I will add this support in beta.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants