staydecent / atom

Shared, synchronous, independent state for JavaScript apps.
ISC License
7 stars 1 forks source link

experiment with middleware #16

Open staydecent opened 5 years ago

staydecent commented 5 years ago
var store = atom(applyMiddleware([someMiddleware], counter), 0)

Could the applyMiddleware just wrap each middleware in a function that returns unchanged state? Do the middleware functions need a way to halt progress, a la next()?