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

Native exceptions when manipulating ART children without a surface #3815

Closed
sophiebits opened this issue Oct 31, 2015 · 2 comments
Closed

Native exceptions when manipulating ART children without a surface #3815

sophiebits opened this issue Oct 31, 2015 · 2 comments
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@sophiebits
Copy link
Contributor

Rendering this component throws a cryptic error on the native side because every ART Group should be mounted in a Surface and it gets confused.

'use strict';

var React = require('react-native');
var ReactART = require('ReactNativeART');

var {View} = React;
var {Group} = ReactART;

var ArtBug = React.createClass({
  getInitialState: function() {
    return {showGroup: true};
  },
  componentDidMount: function() {
    this.setState({showGroup: false});
  },
  render: function() {
    return (
      <View>{this.state.showGroup && <Group />}</View>
    );
  },
});

module.exports = ArtBug;

We should probably throw an error earlier for this case. One way to do it would be to use context to pass down some flag from the Surface and throw if it's not present in the other components.

@browniefed
Copy link
Contributor

@facebook-github-bot label Good First Task

@facebook-github-bot facebook-github-bot added Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Ran Commands One of our bots successfully processed a command. labels Mar 20, 2016
@mkonicek
Copy link
Contributor

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/native-exceptions-when-manipulating-art-children-without-a-surface

ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub. GitHub issues have voting too, nevertheless
Product Pains has been very useful in highlighting the top bugs and feature requests:
https://productpains.com/product/react-native?tab=top

Also, if this issue is a bug, please consider sending a pull request with a fix.
We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

facebook-github-bot pushed a commit that referenced this issue Dec 8, 2016
Summary: Fixes #3815

Differential Revision: D4295976

Pulled By: javache

fbshipit-source-id: 034690d3bee75217d820d3361136a410a812cd2c
mkonicek pushed a commit that referenced this issue Dec 12, 2016
Summary: Fixes #3815

Differential Revision: D4295976

Pulled By: javache

fbshipit-source-id: 034690d3bee75217d820d3361136a410a812cd2c
DanielMSchmidt pushed a commit to DanielMSchmidt/react-native that referenced this issue Jan 4, 2017
Summary: Fixes facebook#3815

Differential Revision: D4295976

Pulled By: javache

fbshipit-source-id: 034690d3bee75217d820d3361136a410a812cd2c
@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants