forked from howtographql/howtographql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
783d60f
commit aac97e8
Showing
4 changed files
with
43 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,41 @@ | ||
// import React from 'react' | ||
// import {Provider} from 'react-redux' | ||
// import createStore from './src/createStore' | ||
// | ||
// const store = createStore() | ||
// | ||
// exports.wrapRootComponent = function wrapRootComponent({Root}) { | ||
// return function wrapRootComponentComponent(props) { | ||
// return ( | ||
// <Provider store={store}> | ||
// <Root /> | ||
// </Provider> | ||
// ) | ||
// } | ||
// } | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
// | ||
|
||
import React from 'react' | ||
import {Provider} from 'react-redux' | ||
import { BrowserRouter as Router } from 'react-router-dom' | ||
import { Provider } from 'react-redux' | ||
|
||
import createStore from './src/createStore' | ||
|
||
const store = createStore() | ||
exports.replaceRouterComponent = ({ history }) => { | ||
const store = createStore() | ||
|
||
const ConnectedRouterWrapper = ({ children }) => ( | ||
<Provider store={store}> | ||
<Router history={history}>{children}</Router> | ||
</Provider> | ||
) | ||
|
||
exports.wrapRootComponent = function wrapRootComponent({Root}) { | ||
return function wrapRootComponentComponent(props) { | ||
return ( | ||
<Provider store={store}> | ||
<Root /> | ||
</Provider> | ||
) | ||
} | ||
return ConnectedRouterWrapper | ||
} |
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
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
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