Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 3x 3x 3x 3x 3x 6x 3x 1x 1x 1x 1x | import React from 'react' import {render} from 'react-dom' import {Provider} from 'react-redux' import {browserHistory} from 'react-router' import {syncHistoryWithStore} from 'react-router-redux' import createStore from './store' Iif (process.env.LOGROCKET) { const LogRocket = require('logrocket') LogRocket.init(process.env.LOGROCKET) } export function create ({ app, reducers }) { const store = createStore(reducers) const history = process.env.NODE_ENV !== 'test' ? syncHistoryWithStore(browserHistory, store) : {} return React.createElement(Provider, {store}, React.createElement(app, {history, store})) } export default function mount ({ app, id = 'root', reducers }) { return render( create({app, reducers}), document.getElementById(id) ) } |