Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LayoutAnimation Android throwing IllegalViewOperationException #10745

Closed
tomwalters opened this issue Nov 4, 2016 · 1 comment
Closed

LayoutAnimation Android throwing IllegalViewOperationException #10745

tomwalters opened this issue Nov 4, 2016 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@tomwalters
Copy link

Description

I have a set of components conditionally rendering in my main component's render method:

renderTop () {
  if (this.state.shouldRenderTop) {
    return <Text>Top</Text>
  }

  return null
}

render () {
  <View>
    {this.renderTop()}
    {this.renderMiddle()}
    {this.renderBottom()}
  </View>
}

Each of the sub-rendering methods is in charge of rendering a component. I have buttons which can toggle the state flags to change the view.

I'm using LayoutAnimation on both platforms (enabled via the UIManager on Android).

This works fine on iOS, but on Android I get this error:

screen shot 2016-11-04 at 12 53 59

This occurs when firing the state-change. It appears to be being thrown by the NativeViewHierarchyManager class.

The only solution I've found is to disable the LayoutAnimation.

Reproduction

Checkout this RNPlay app for a demo of the behaviour. Here the cycle button simple disappears, the error appears to be swallowed.

Additional Information

  • React Native version: 0.36.0
  • Platform: Both
  • Operating System: MacOS
@hramos
Copy link
Contributor

hramos commented May 25, 2017

We're cutting down on the number of outstanding issues, in order to allow us to focus. I'm closing this issue because it has been open for over 60 days with no activity. If you think it should still be opened let us know why. PRs are always welcome.

@hramos hramos closed this as completed May 25, 2017
@hramos hramos added the Icebox label May 26, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jul 19, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants