Esempio n. 1
0
  componentDidMount: function() {
    var props = this.props;

    this.node = Mode.Surface(+props.width, +props.height);
    var surfaceElement = this.node.toElement();

    // Replace placeholder hoping that nothing important happened to it
    var node = this.getDOMNode();
    if (node.parentNode) {
      node.parentNode.replaceChild(surfaceElement, node);
    }
    ReactMount.setID(surfaceElement, this._rootNodeID);

    this.props = {style:{}};
    this.setApprovedDOMProperties(props);

    var transaction = ReactComponent.ReactReconcileTransaction.getPooled();
    transaction.perform(
      this.mountAndInjectChildren,
      this,
      props.children,
      transaction
    );
    ReactComponent.ReactReconcileTransaction.release(transaction);

    this.props = props;
  },
Esempio n. 2
0
  componentDidMount() {
    const {height, width} = this.props;

    this._surface = Mode.Surface(+width, +height, this._tagRef);

    this._mountNode = ARTRenderer.createContainer(this._surface);
    ARTRenderer.updateContainer(this.props.children, this._mountNode, this);
  }
Esempio n. 3
0
  componentDidMount: function componentDidMount() {
    var domNode = ReactDOM.findDOMNode(this);

    this.node = Mode.Surface(+this.props.width, +this.props.height, domNode);

    var transaction = ReactUpdates.ReactReconcileTransaction.getPooled();
    transaction.perform(this.mountAndInjectChildren, this, this.props.children, transaction, ReactInstanceMap.get(this)._context);
    ReactUpdates.ReactReconcileTransaction.release(transaction);
  },