1.20.4 • Published 7 years ago

slex-store-bootstrap v1.20.4

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

CircleCI

Slex Store Bootstrap

$ npm install slex-store-bootstrap

slex-store-bootstrap Is a set of slex-store bindings to delay rendering app until after bootstrapping is complete.

Example Usage

import React from 'react'
import ReactDOM from 'react-dom'
import { createStore } from 'slex-store'
import { createBootstrap, createDeferredRenderApp } from 'slex-store-bootstrap'

const bootstrap = createBootstrap({
  restoreLogin: ({ dispatch, getState }) => {...}
})
const store = slexStore.createStore(
  slexStore.createDispatch({
    reducer: slexStore.createReducer({
      bootstrap: bootstrapReducer
    })
  })
)
const renderApp = createDeferredRenderApp((store) => {
  ReactDOM.render(<App />, document.getElementById('app'))
})

bootstrap(store)
renderApp(store)
1.20.4

7 years ago

1.20.3

7 years ago

1.20.2

7 years ago

1.20.1

7 years ago

1.10.8

7 years ago

1.10.7

7 years ago

1.10.5

7 years ago

1.10.4

7 years ago

0.1.0

7 years ago