finds.dev← search

// the find

markerikson/project-minimek

★ 277 · JavaScript · MIT · updated Jan 2018

A sample app to demonstrate various useful Redux techniques, accompanying the blog series at http://blog.isquaredsoftware.com/series/practical-redux

A sample BattleTech force-manager app by Mark Erikson (one of the Redux maintainers) built to accompany his 'Practical Redux' blog series from 2017. It demonstrates normalized state, selectors, and connected component patterns in the pre-RTK era. This is purely a teaching artifact, not a usable template.

The author knows Redux better than almost anyone — the state normalization and selector patterns here are correct and intentional, not cargo-culted. The domain is more complex than a TODO app: pilots, mechs, lances, and companies give the data model enough shape to show real relational state management problems. The accompanying blog series is thorough and explains the 'why' behind each decision, which the code alone doesn't. It uses reselect for memoized selectors in a way that was genuinely non-obvious at the time.

Abandoned since January 2018 — Redux Toolkit didn't exist yet, so every pattern here (hand-written action type constants, switch-statement reducers, explicit combineReducers wiring) is exactly what RTK was designed to replace. Anyone learning Redux from this will learn the old way first and then have to unlearn it. The offline-mirror directory commits the entire yarn package cache — hundreds of .tgz tarballs — directly into the repo, which bloats the clone size for no benefit to anyone reading the code. There are no tests anywhere in the project, which undercuts its value as a reference for how to structure a testable Redux app.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →