Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Changed parent node access to use Polymer.dom api#66

Open
taylorstine wants to merge 1 commit intoPolymerElements:masterfrom
taylorstine:master
Open

Changed parent node access to use Polymer.dom api#66
taylorstine wants to merge 1 commit intoPolymerElements:masterfrom
taylorstine:master

Conversation

@taylorstine
Copy link
Copy Markdown

When adding a <paper-ripple> dynamically with React in the render method (i.e.)

let component = React.createClass({
   getInitialState: function() {
     return {addIt: false}
   }
   render: function() {
     let node = null;
     if (this.state.addIt) {
       node = <paper-ripple/>
     }
     return <div>{node}</div>
   }
   componentDidMount: function () {
       this.setState({addIt: true})
   }

})

This line gives me an error because this.parentNode is undefined.

Per these specifications I believe a better alternative is to use the Polymer.dom api.

@taylorstine
Copy link
Copy Markdown
Author

Is anybody reviewing this?

@taylorstine
Copy link
Copy Markdown
Author

@google ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants