Last active
February 24, 2020 01:50
-
-
Save ORESoftware/0c952b9231a27fe94299d92f6cb26663 to your computer and use it in GitHub Desktop.
Our root.jsx file, which is not the entry point, the entry point is the parent of this file
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
import {Provider} from "react-redux"; | |
import { | |
Router, | |
Route, | |
browserHistory, | |
} from "react-router" | |
import React from "react"; | |
import {store} from './redux-store' | |
import {YourComponent1} from './components/my-component1' | |
import {Your404Component} from './components/my-404component' | |
class Root extends React.Component { | |
render() { | |
return ( | |
<Provider store={store}> | |
<Router history={browserHistory}> | |
<Route path="/actions/login" component={YourComponent1}/> | |
<Route path="*" exact component={Your404Component}/> | |
</Router> | |
</Provider> | |
); | |
} | |
} | |
export default Root; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment