import PropTypes from 'prop-types';
import React from 'react';
import Header from '../organisms/Header';
import Footer from '../organisms/Footer';

class Page extends React.Component {
  render() {
    return (
      <div>
        <Header />

        { this.props.children }

        <Footer />
      </div>
    );
  }
}

Page.propTypes = {
  children: PropTypes.node,
};

export default (Page);

import PropTypes from 'prop-types';
import React from 'react';
import Header from '../organisms/Header';
import Footer from '../organisms/Footer';
import { hot } from 'react-hot-loader';

class Page extends React.Component {
  render() {
    return (
      <div>
        <Header />

        { this.props.children }

        <Footer />
      </div>
    );
  }
}

Page.propTypes = {
  children: PropTypes.node,
};

export default hot(module)(Page);

Allow hot reloading outside of page content...
Allow hot reloading outside of page content...

https://github.com/gatsbyjs/gatsby/issues/8237#issuecomment-422213443
Though according to someone on discord, hot reloading should have been
working out of the box.
Also, not sure if this change has any consequences.
