11.0.0 • Published 12 months ago

fl-react-server v11.0.0

Weekly downloads
7
License
MIT
Repository
github
Last release
12 months ago

Server side renderer function for React, used in Frameworkstein apps

version MIT License PRs Welcome

createServerRenderer

Helper method that takes care of a bunch of boilerplate for rendering react components server side.

Usage:

import _ from 'lodash'
import { createServerRenderer } from 'fl-react-server'
import config from '../config'
import createStore from '../../shared/createStore'
import getRoutes from '../../shared/routes'
import loadInitialState from '../loadInitialState'
import App from '../../shared/modules/app/containers/App'

export default createServerRenderer({
  createStore,                        // Function to create your redux store.

  getRoutes,                          // Function that returns your react-router routes.

  config,                             // Object or function that returns an object. 
                                      // Config gets added to your stores initial state.

  loadInitialState: (req, callback) => callback(null, state),                   
                                      // Function called on each request. 
                                      // You can load up any extra data to place in your store here. 
                                      // It'll be added to the initial state.
  
  omit: 'admin',                      // String or list of strings
                                      // These properties will be omitted from the stores initial state.

  alwaysFetch: App,                   // Component or list of components that will have their 
                                      // fetchData method called on each request.
})
11.0.0

12 months ago

10.1.4

1 year ago

10.0.0

1 year ago

9.0.0-rc.6

2 years ago

9.0.0-rc.4

2 years ago

9.0.0-rc.2

2 years ago

9.0.0

2 years ago

7.8.0

2 years ago

7.6.19

3 years ago

7.6.18

3 years ago

7.6.20

3 years ago

7.6.5

3 years ago

7.6.0

3 years ago

7.6.4

3 years ago

7.6.3

3 years ago

7.5.0

3 years ago

7.2.5

4 years ago

7.0.25

4 years ago

7.0.17

5 years ago

7.0.14

5 years ago

7.0.13

5 years ago

7.0.11

5 years ago

7.0.10

5 years ago

7.0.9

5 years ago

7.0.8

5 years ago

7.0.7

5 years ago

7.0.5

5 years ago

7.0.0

5 years ago

6.17.14

5 years ago

6.16.1

5 years ago

6.12.6

5 years ago

6.12.1

5 years ago

6.11.1

5 years ago

6.11.0

5 years ago

6.8.1

5 years ago

6.7.14

5 years ago

6.7.6

6 years ago

6.5.1

6 years ago

6.2.1

6 years ago

6.1.12

6 years ago

6.1.11

6 years ago

6.1.8

6 years ago

6.1.6

6 years ago

6.1.5

6 years ago

6.1.4

6 years ago

6.1.3

6 years ago

6.1.2

6 years ago

6.1.0

6 years ago

6.0.1

6 years ago

6.0.0

6 years ago

5.0.3

6 years ago

5.0.1

6 years ago

5.0.0

6 years ago

4.0.15

6 years ago

3.0.5

6 years ago

1.0.0

7 years ago

1.0.0-alpha.7

7 years ago

1.0.0-alpha.6

7 years ago

1.0.0-alpha.5

7 years ago

1.0.0-alpha.4

7 years ago

1.0.0-alpha.3

7 years ago

1.0.0-alpha.2

7 years ago

1.0.0-alpha.1

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago