2.0.0 • Published 5 years ago

react-kits-server v2.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

react-kits-server

Express server for server-side rendering with data prefetching.

Install

yarn add react-kits-server

API

import { createReactServer } from 'react-kits-server'

import createStore from '../store/createStore'
import { getInitialData } from '../routes'
import { HOME_PATH, ASSET_URL } from '../url'
import CoreLayout from '../layouts/CoreLayout'

const app = createReactServer({
  createStore,
  getInitialData,
  homePath: HOME_PATH,
  assetUrl: ASSET_URL,
  customMiddleware: expressIns => {},
  onRender: () => <CoreLayout />
})

/**
 * `createStore` is a function that must return Redux store.
 * `getInitialData` is a function that must return Promise.
 * `onRender` is a function that must return React element.
 **/

License

MIT

4.0.0-alpha.0

5 years ago

3.0.0-alpha.5

5 years ago

3.0.0-alpha.4

5 years ago

3.0.0-alpha.3

5 years ago

3.0.0-alpha.2

5 years ago

3.0.0-alpha.1

6 years ago

3.0.0-alpha.0

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago

1.0.0-alpha.1

6 years ago

1.0.0-alpha.0

6 years ago

1.0.0-1

6 years ago

1.0.0-0

6 years ago

0.13.0

6 years ago

0.12.0

6 years ago

0.11.0

6 years ago

0.10.0

6 years ago

0.9.0

6 years ago

0.8.0

6 years ago

0.7.4

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago