woonerf
React/Redux bootstrapping and common libs for Conveyal.
Modern JavaScript applications take a lot of bootstrapping. This library helps with some common libs to include and use on the client to help.
Usage
Let's create a Redux application:
const {mount} = require('@conveyal/reboot')
const Application = require('./containers/application')
const reducers = require('./reducers')
mount({
app: Application,
id: 'root',
reducers
})
This will create a redux store with the fetch
, history
, logger
, multi
, and promise
middleware applied, wrap your application with a redux provider, initialize the browser history, and mount your component to #id
.
API
auth0
fetch({url, options, next})
html({title})
mount({app, id, reducers})
Install
With yarn installed, run
$ yarn add @conveyal/reboot
See Also
License
MIT