Skip to content

Instantly share code, notes, and snippets.

View Mk-Etlinger's full-sized avatar

Mike Etlinger Mk-Etlinger

  • Grand Rapids
View GitHub Profile
"<table>
<tr>
<td>Hello</td>
<td>World</td>
</tr>
</table>"
render() {
// React does *not* create a new div. It renders the children into `domNode`.
// `domNode` is any valid DOM node, regardless of its location in the DOM.
return ReactDOM.createPortal(
this.props.children,
domNode,
);
}
class Columns extends React.Component {
render() {
return (
<React.Fragment>
<td>Hello</td>
<td>World</td>
</React.Fragment>
);
}
}
@Mk-Etlinger
Mk-Etlinger / gist:7f7874ae828ccc1c018de21d615a151a
Last active January 31, 2018 19:50
React Component Example
import React, { Component } from 'react';
class ChatBox extends Component {
constructor() {
super();
this.state = {
maintainState: 'here'
}
}