11.0.0 • Published 2 years ago

fl-react-server v11.0.0

Weekly downloads
7
License
MIT
Repository
github
Last release
2 years 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

2 years ago

10.1.4

2 years ago

10.0.0

3 years ago

9.0.0-rc.6

3 years ago

9.0.0-rc.4

3 years ago

9.0.0-rc.2

3 years ago

9.0.0

3 years ago

7.8.0

3 years ago

7.6.19

4 years ago

7.6.18

4 years ago

7.6.20

4 years ago

7.6.5

4 years ago

7.6.0

4 years ago

7.6.4

4 years ago

7.6.3

4 years ago

7.5.0

4 years ago

7.2.5

5 years ago

7.0.25

6 years ago

7.0.17

6 years ago

7.0.14

6 years ago

7.0.13

6 years ago

7.0.11

6 years ago

7.0.10

6 years ago

7.0.9

6 years ago

7.0.8

6 years ago

7.0.7

6 years ago

7.0.5

6 years ago

7.0.0

6 years ago

6.17.14

6 years ago

6.16.1

6 years ago

6.12.6

6 years ago

6.12.1

6 years ago

6.11.1

6 years ago

6.11.0

6 years ago

6.8.1

6 years ago

6.7.14

7 years ago

6.7.6

7 years ago

6.5.1

7 years ago

6.2.1

7 years ago

6.1.12

7 years ago

6.1.11

7 years ago

6.1.8

7 years ago

6.1.6

7 years ago

6.1.5

7 years ago

6.1.4

7 years ago

6.1.3

7 years ago

6.1.2

7 years ago

6.1.0

7 years ago

6.0.1

7 years ago

6.0.0

7 years ago

5.0.3

7 years ago

5.0.1

7 years ago

5.0.0

7 years ago

4.0.15

7 years ago

3.0.5

7 years ago

1.0.0

8 years ago

1.0.0-alpha.7

8 years ago

1.0.0-alpha.6

8 years ago

1.0.0-alpha.5

8 years ago

1.0.0-alpha.4

8 years ago

1.0.0-alpha.3

8 years ago

1.0.0-alpha.2

8 years ago

1.0.0-alpha.1

8 years ago

0.4.3

8 years ago

0.4.2

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.2

8 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago