Skip to content

Commit

Permalink
Client index changes
Browse files Browse the repository at this point in the history
  • Loading branch information
yusinto committed Jan 18, 2018
1 parent 1dd417f commit 9b53406
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions example/src/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ import {Router, browserHistory} from 'react-router';
import routes from '../universal/routes';
import {Provider} from 'react-redux';
import createStore from '../universal/redux/store';
import ldRedux from 'ld-redux';
import ldRedux from '../../../lib';
import flags from '../../flags.json';

const reduxState = window.__INITIAL_STATE__ || undefined;
const store = createStore(reduxState);
const reduxStore = createStore(reduxState);

ldRedux.init('your-client-side-id', store);
ldRedux.init({
clientSideId: 'your-client-side-id',
reduxStore,
flags,
});

render(
<Provider store={store}>
<Provider store={reduxStore}>
<Router routes={routes} history={browserHistory}/>
</Provider>,
document.getElementById('reactDiv')
Expand Down

0 comments on commit 9b53406

Please sign in to comment.