Created
July 26, 2018 11:50
-
-
Save vschoener/b7aa6bb60a178697fcb39b587192e389 to your computer and use it in GitHub Desktop.
React index
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 * as React from 'react'; | |
import { render as ReactRender } from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import { Router, Route } from 'react-router-dom'; | |
import './scss/main.scss'; | |
import SignIn from './components/auth/signin/SignIn'; | |
import SignUp from './components/auth/signup/SignUp'; | |
import Event from './components/dashboard/event/Event'; | |
import AuthorizedRoute from './hoc/AuthorizedRouteHOC'; | |
function render() { | |
ReactRender( | |
<Provider store={store}> | |
<Router history={history}> | |
<App> | |
<Route exact path="/" component={Home} /> | |
<Route path="/signIn" component={SignIn} /> | |
<Route path="/signUp" component={SignUp} /> | |
<AuthorizedRoute path="/dashboard/event" component={Event} /> | |
</App> | |
</Router> | |
</Provider> | |
, | |
document.getElementById('root'), | |
); | |
} | |
// This is required to have saga information using devTools | |
render(); | |
// Need to read back the doc about it :) | |
store.subscribe(render); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment