Skip to content

Instantly share code, notes, and snippets.

@pkellner
Created May 26, 2018 16:23
Show Gist options
  • Save pkellner/91aa4cfff40ac0652a4295565c79e1a0 to your computer and use it in GitHub Desktop.
Save pkellner/91aa4cfff40ac0652a4295565c79e1a0 to your computer and use it in GitHub Desktop.
FullPage.js - 3rd Module - Custom WebPack
import React, { Component } from 'react';
import CodeCampMenu from './CodeCampMenu';
import PageTop from './PageTop';
import Footer from './Footer';
import Routes from '../../Routes';
class FullPage extends Component {
constructor(props){
super(props);
this.handler = this.handler.bind(this);
}
handler(val) {
this.props.action();
}
render() {
return (
<div>
<PageTop>
<CodeCampMenu />
</PageTop>
<Routes action={this.handler} />
<Footer />
</div>
);
}
}
FullPage.defaultProps = {};
export default FullPage;
@pkellner
Copy link
Author

I think you can safely ignore the constructor and this.handler in routes.

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