Skip to content

Error: [Reanimated] Reading from _value directly is only possible on the UI runtime. Perhaps you passed an Animated Style to a non-animated component? #6246

Answered by MatiPl01
zj-wukewei asked this question in Q&A
Discussion options

You must be logged in to vote

Hey!

Issue description

I looked into the react-native source code and the problem is caused by the fact that react-native clones the child, which is used as a sticky-header in the default sticky header implementation (see this line of code). It looks that after cloning, the Animated.View no longer works and it works like a plain react-native View component. Because this view is no longer Animated.View, the animated style that you correctly passed to the Animated.View is now passed to it's non-animated clone (plain View), which results in the error that you can see.

Proposed solution

Solution 1 (easiest)

In order to make it work, you can just wrap your Animated.View with the plain View com…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MatiPl01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants