React Native Crashes when an AnimatedLayout component is rendered without an animated view child
See original GitHub issueDescription
App crashing if you don’t render an Animated View as a child of the AnimatedLayout
Expected behavior
App to not crash, or throw a better error message
Actual behavior & steps to reproduce
Render a <AnimatedLayout> without an <Animated.View> as a child.
Snack or minimal code example
<AnimatedLayout>
// <Animated.View />
<Text>Some random text</Text>
</AnimatedLayout>
Package versions
- React Native: 0.64.2
- React Native Reanimated: 2.3.0-alpha.1
- NodeJS: 15.14.0
- Xcode: 12.5.1
- Java & Gradle:
Affected platforms
- [?] Android
- iOS
- Web
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Trying to remove a view index above child count error
This works on both Android and iOS without any crashes. ... raised when I was rendering new Markers onto a Map (which was...
Read more >Layout Animations - React Native Reanimated - YouTube
In React Native every component appears instantly whenever you add it to the component hierarchy. It's not something we are used to in...
Read more >React Native Reanimated 2 Layout Animation Example
Tagged with reactnative, reanimated, animation, layout. ... And a parent component which renders the list of cards: ... View component.
Read more >Layout Transitions | React Native Reanimated
To be precise how to animate positions and dimensions of components. What's important it will all happen entirely on UI thread without any...
Read more >react-native-screens - npm
This component is a container for views we want to display on a navigation screen. It is designed to only be rendered as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
A small correction, this only happens when you attempt to unmount an AnimatedLayout.
It should be fixed by: https://github.com/software-mansion/react-native-reanimated/pull/2302