Skip to content

Instantly share code, notes, and snippets.

View taylor-jones's full-sized avatar

Taylor Jones taylor-jones

View GitHub Profile
@taylor-jones
taylor-jones / HtmlComment.jsx
Last active February 19, 2019 19:22 — forked from alexeychikk/ReactComment.jsx
Simple React HTML comment
/* eslint-disable react/no-find-dom-node */
import React, { PureComponent } from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
class HtmlComment extends PureComponent {
componentDidMount() {
const node = ReactDOM.findDOMNode(this);
ReactDOM.unmountComponentAtNode(node);