gordonbrander / spellcaster

Reactive signals UI library
MIT License
57 stars 2 forks source link

Factor out store fx into middleware #38

Closed gordonbrander closed 6 months ago

gordonbrander commented 6 months ago

This PR factors out fx and logging into middleware. Store signature has changed, and includes a new parameter, middleware. Breaking change.

import {store, fxware} from 'spellcaster/spellcaster.js'

const [state, send] = store({
  state: {},
  update,
  middleware: fxware(fx)
})

This does a few things:

bfollington commented 6 months ago

Nice! LGTM, not that you need my approval ;)