React: How to access returned HTML within a React Component

/ Published in: JavaScript
Save to your folder(s)

Within a react component. How to gain access to the HTML that was just rendered.

Any returned html element that is tagged with a ref, can easily be accessed by it's ref after it's been rendered. In the below case, use this.refs["domainModal"] to access the html. This access is limited to within the scope of the instance of this react component.

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.