3 ms·
Vanilla redux isn't really useful for what most people are building. We have a simple app for a few tabbed lists of items, filtering and sorting that list, and
by quxbar 8y ago
Vanilla redux isn't really useful for what most people are building. We have a simple app for a few tabbed lists of items, filtering and sorting that list, and taking basic state changes on the items. The first epiphany I had was using redux-first-router to couple URL to state, with thunks to load in data based on the parameter. That takes care of pagination and filtering on the lists. Then we use middleware to write the API calls for our state changes, and as a logging layer, since all of our navigation actions are meaningful (changing sort order, bringing up a particular item, etc). It's a very simple pattern for other developers to use, I find, and the boilerplate is minimal.