question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Native Crashes when an AnimatedLayout component is rendered without an animated view child

See original GitHub issue

Description

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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AustinHuntcommented, Aug 18, 2021

A small correction, this only happens when you attempt to unmount an AnimatedLayout.

0reactions
piaskowykcommented, Aug 24, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found