Skip to content

Instantly share code, notes, and snippets.

@ORESoftware
Last active February 24, 2020 01:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ORESoftware/0c952b9231a27fe94299d92f6cb26663 to your computer and use it in GitHub Desktop.
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
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