Skip to content

Instantly share code, notes, and snippets.

@frankfaustino
Last active March 15, 2018 18:17
Show Gist options
  • Save frankfaustino/68184654f890aaaf7b1b1523cfdae0da to your computer and use it in GitHub Desktop.
Save frankfaustino/68184654f890aaaf7b1b1523cfdae0da to your computer and use it in GitHub Desktop.
React: Stateless functional components
// Good
const TableRowWrapper = ({ children }) => (
<tr>
{children}
</tr>
)
// Bad
class TableRowWrapper extends Component {
render() {
return (
<tr>
{this.props.children}
</tr>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment