Miss any of our Open RFC calls?Watch the recordings here! »

dyad-fsa-promise

0.1.2 • Public • Published

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!'

Install

npm i dyad-fsa-promise

DownloadsWeekly Downloads

6

Version

0.1.2

License

CC-BY-SA-4.0

Unpacked Size

10.7 kB

Total Files

10

Last publish

Collaborators

  • avatar