Skip to content

Initial styles are not always applied on first render RN 0.76.0+ #8379

@nick-lvov-dev

Description

@nick-lvov-dev

Description

I'm using a custom input that has labels that are transforming based on the input focus and if it has value. After upgrading my RN version the labels are not transformed correctly on first render anymore, but if you focus the input and then remove the focus they are transformed correctly. My repo has RN 0.77 and the issue is only reproducible on iOS, but I was able to reproduce it in Expo Snack on RN 0.76 on both iOS and Android.

Steps to reproduce

  1. Apply styles to an Animated.Text element using useSharedValue and useAnimatedStyle

Expected result: styles are applied immediately
Actual result: styles are not applied on first render

Snack or a link to a repository

https://snack.expo.dev/@nicklvovdev/c44d9a

Reanimated version

4.1.1

Worklets version

0.5.1

React Native version

0.81.4

Platforms

iOS

JavaScript runtime

None

Workflow

Expo Go

Architecture

New Architecture (Fabric renderer)

Build type

No response

Device

Real device

Host machine

macOS

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: iOSThis issue is specific to iOSRepro providedA reproduction with a snippet of code, snack or repo is provided

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions