Let’s play “Spot the reducer” game.
export const actions = store => ({
increment: state => ({ count: state.count + 1 }),
decrement: state => ({ count: state.count - 1 })
})
I see two. ;-) How many can you spot?
This is a nice approach and there are few action/reducer creator libraries wrapping Redux accomplishing the same or similar result.
Why would one want to wrap Redux library instead rewriting it in 1k? See http://wiki.c2.com/?RewriteCodeFromScratch