Last active
October 29, 2016 19:32
-
-
Save jaredatron/8a1412cfad8597d864be377d3dcc2873 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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