import { Meteor } from 'meteor/meteor'
import { render } from 'react-dom'

import { renderRoutes } from './routes.jsx'

Meteor.startup(() => {
  render(renderRoutes(), document.getElementById('app'))
})

import { Meteor } from 'meteor/meteor'
import { render } from 'react-dom'
import { createStore } from 'redux'

import { renderRoutes } from './routes.jsx'
import withProvider from '../both/withProvider'
import mainReducer from '../../api/redux/reducers'

Meteor.startup(() => {
  const store = createStore(mainReducer, window.__PRELOADED_STATE__)

  delete window.window.__PRELOADED_STATE__

  render(withProvider(store, renderRoutes()), document.getElementById('app'))
})

Configure client-side init to use a Redux store initialized with data arrived from the server.