Skip to content

Instantly share code, notes, and snippets.

@gihrig
Last active June 30, 2016 02:09
Show Gist options
  • Save gihrig/8f0dceef9fe7e5da52dd0e8aa102ad09 to your computer and use it in GitHub Desktop.
Save gihrig/8f0dceef9fe7e5da52dd0e8aa102ad09 to your computer and use it in GitHub Desktop.
/* eslint-disable react/prefer-stateless-function */
class App extends React.Component {
render() {
return (
<div className={styles.wrapper}>
<A className={styles.logoWrapper} href="https://twitter.com/mxstbr">
<Img className={styles.logo} src={Banner} alt="react-boilerplate - Logo" />
</A>
{this.props.children}
<Footer />
</div>
);
}
}
@gihrig
Copy link
Author

gihrig commented Jun 28, 2016

This is mxstbr/react-boilerplate containers/App showing changes required to convert from a function component to an ES6 class component. Code not shown is unchanged.

These changes allow Hot Module Reloading (HMR) to operate on this component. see issue #590

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