dyad-fsa-promise
v0.1.2
Published
Dyad promise middleware with Flux Standard Action support
Downloads
3
Readme
Dyad FSA Promise Middleware
Installation
npm install dyad-fsa-promise
Usage
const Dyad = require('dyad')
const {middleware} = require('dyad-fsa-promise')
const store = Dyad.getInstance()
store.use(middleware)
store.bind({
ACTION_TYPE: (_, __, action) => console.log(action.payload)
})
store.dispatch({type: 'ACTION_TYPE', payload: Promise.resolve('Hello, World!')})
// Logs 'Hello, World!'