Skip to content

Instantly share code, notes, and snippets.

@Metnew
Created January 13, 2018 03:58
Show Gist options
  • Save Metnew/6c648772e215d7a6e080191e17f06b9f to your computer and use it in GitHub Desktop.
Save Metnew/6c648772e215d7a6e080191e17f06b9f to your computer and use it in GitHub Desktop.
// Styles
import ‘semantic-ui-css/semantic.css’
// Fetch and promise polyfill
import ‘promise-polyfill’
import ‘isomorphic-fetch’
// Application
import React from ‘react’
import ReactDOM, {render} from ‘react-dom’
import {configureApp, configureRootComponent} from ‘common/app’
// get initial redux state from server
const initialState = window.__INITIAL_STATE__ || {}
const propsForRoot = configureApp(initialState)
const RootComponent = configureRootComponent(propsForRoot)
render(RootComponent, document.getElementById(‘app’))
// HMR
if (module.hot) {
 module.hot.accept()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment