Skip to content

Instantly share code, notes, and snippets.

@czbaker
Created March 22, 2016 14:55
Show Gist options
  • Select an option

  • Save czbaker/eb85921a9e709d0b0765 to your computer and use it in GitHub Desktop.

Select an option

Save czbaker/eb85921a9e709d0b0765 to your computer and use it in GitHub Desktop.
// React, etc.
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
// Nav component
import NavigationContainer from './navigation/navigation-container.jsx';
// ReactRedux Connection
const mapStateToProps = (state) => {
return {
authShow: state.auth.show
}
}
const mapDispatchToProps = (dispatch) => {
return {
dispatch
}
}
let App = React.createClass({
render() {
return (
<div>
{/* Bootstrap Nav Bar */}
<NavigationContainer />
{/* Nav (left) and Content (right) */}
{this.props.children}
</div>
);
}
});
export default connect(mapStateToProps, mapDispatchToProps)(App);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment