Skip to content

Instantly share code, notes, and snippets.

@jaredatron
Last active October 29, 2016 19:32
Show Gist options
  • Save jaredatron/8a1412cfad8597d864be377d3dcc2873 to your computer and use it in GitHub Desktop.
Save jaredatron/8a1412cfad8597d864be377d3dcc2873 to your computer and use it in GitHub Desktop.
const DanielasAwesomePage = (props) => {
const {activeTab, otherOption} = props
return <div className="DanielasAwesomeMap">
...
</div>
}
const PageA = (props) => (
<DanielasAwesomePage
activeTab="TabA"
otherOptions={...}
/>
)
const PageB = (props) => {
<DanielasAwesomePage
activeTab="TabB"
otherOptions={...}
/>
}
// you can even wrap PageA and PageB in different redux connections
const NotFoundErrorPage = () => (
<div><h1>Error Page Not Found</h1></div>
)
const App = () => (
<Router history={browserHistory}>
<Route path="/pageA" component={PageA}/>
<Route path="/pageB" component={PageB}/>
<Route path="/*" component={NotFoundErrorPage}/>
</Router>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment