Let’s play “Spot the reducer” game.

Written by hackernoon-archives | Published 2017/10/28
Tech Story Tags: javascript | preact | spot-the-reducer-game | react | redux

TLDRvia the TL;DR App

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


Published by HackerNoon on 2017/10/28