Skip to content

Reanimated CSS transitions break color updates #1007

@believer

Description

@believer

What happened?

When using Unistyles together with one of Reanimated's CSS transitions color changes don't update as expected. I've updated my repro repo from #980 with the bug.

Note: It does work if we bring in the colors using useUnistyles inside the component, but we would like to avoid that if possible to get all of Unistyles no-re-rendering sweetness 😄

<Animated.View
  style={[
    styles.checkbox(checked),
    {
      transitionProperty: ['backgroundColor'],
      transitionDuration: 1000,
    },
  ]}
/>
<Animated.View style={styles.checkbox(checked)} />
On load Check boxes Change theme
Image Image Image
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-10-13.at.09.03.24.mov

Steps to Reproduce

  1. Click “Check box”. The bottom box changes color instantly (not using CSS transitions), the top one changes color over one second.
  2. Click “Change theme”. Only the bottom check box changes color, and the top one still has light mode color.
  3. Clicking “Check box” again makes the colors correct.

Snack or Repository Link (Optional)

https://github.com/believer/unistyles-repro

Unistyles Version

3.0.15

React Native Version

0.81.4

Platforms

Android, iOS

Expo

No

Additional information

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions