How to use the resolve-redux.deserializeInitialState function in resolve-redux

To help you get started, we’ve selected a few resolve-redux examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github reimagined / resolve / packages / resolve-scripts / src / defaults / client_index.js View on Github external
createStore,
  deserializeInitialState
} from 'resolve-redux'
import createHistory from 'history/createBrowserHistory'

import routes from '$resolve.routes'
import rootPath from '$resolve.rootPath'
import staticPath from '$resolve.staticPath'
import aggregateActions from '$resolve.aggregateActions'
import viewModels from '$resolve.viewModels'
import readModels from '$resolve.readModels'
import aggregates from '$resolve.aggregates'
import subscribeAdapter from '$resolve.subscribeAdapter'
import redux from '$resolve.redux'

const initialState = deserializeInitialState(
  viewModels,
  window.__INITIAL_STATE__
)

const origin = window.location.origin

const history = createHistory({
  basename: rootPath
})

const isClient = true

const store = createStore({
  redux,
  viewModels,
  readModels,