Redux生态系统枚举

760 查看

这里有字数限制,全文可以参考这里

Redux Ecosystem Links Introduction

本文是对redux-ecosystem-links的Fork与翻译。本文包含了一系列Redux的插件或者与之有紧密关联的项目的集合。本文包含了Redux官方文档中的 Ecosystem page 以及 Awesome-Redux 列表, 并且包含了很多笔者自己搜集的项目列表。列举在某个具体的目录下的项目没有特定的顺序,只是按照我添加的顺序来。

Core Redux Concepts:核心的Redux概念

Reducers

Reducer Utilities

一个用于将多个单独的Redux Reducer合并为一个单独的Key的Reducer。

按照从左到右的顺序来合并Reducers

用于定义清晰的带有类型检查的Action Payloads,基于Redux Duck Paradigm。

以结构化方式组织Reducers

Create a redux reducer from an object of action handling functions, keyed by the actions they handle. Has createReducer.compose(fns) helper function to combine multiple action handlers into a single action.

Redux reducer that maps over an object of action types.

A utility to create Redux reducers from simple objects.

A utility to create Redux reducers which only respond to prefixed actions.

reducer-chain helps you to chain redux reducers with given state and action, then keep last updated state.

reducer-pipe helps you to pipe redux reducers with given state and action, passing previously returned state to next reducer, then keep last updated state.

reducer-sandbox helps you to reuse your redux reducers in different place without conflict them.

Publishing createReducer from Redux's Reducing Boilerplate page.

Remove redux reducer boilerplate

This library is intended to provide a little more object-oriented approach to write reducers. All it does is provide Reducer and CombineReducers classes to get rid of switch-case. Additionally it also lets you modify reducers dynamically.

A small library for writing redux actions with less boilerplate using classes.

Slightly more concise reducer switching for Flux Standard Actions.

Functions to easily build redux reducers without boilerplate code.

Reducer manager, it can be used as a replace for switch in Redux reducers

A personal preference for building reducers for Redux.

A way to combine reducers by their dependencies and access at their ancestor's values.

Another attempt to reuse your reducers, inspired from multireducer

Like Redux's combineReducers, but more better! Allows definition of nested reducers and multiple top-level reducers.

Higher-Order Reducers

Higher order reducer to add undo/redo functionality to redux state containers

Higher-order reducer to ignore redux actions

Higher-order reducer to reset the redux state on certain actions

Optimistically apply actions that can be later commited or reverted.

A reducer enhancer to enable type-agnostic optimistic updates

Higher-order reducer for store entities received from gaearon's normalizr and makes it easy to handle them.

Higher order cache reducer

Provides a higher-order reducer for managing multiple instances of the same redux state subtree.

A redux higher order reducer to simplify the state of fetched data.

Advanced Reducer Use Cases

https://medium.com/@matt.krick/solving-r...
https://medium.com/@matt.krick/introduci...
Adds additional logic to reducers to handle ordering of reducer handling, dynamic state creation, and display of reducer behavior in the Redux DevTools.

A component model for Redux state trees based on the React.js component model and other familiar design patterns from the React ecosystem. Allows creation of "reducer components" that can be dynamically added and removed, and targeted with scoped actions.

A configurable createReducer factory (i.e. it is a factory for making a createReducer function) that essentially allows projects to insert extra generic reducers (enhancers) before and after individual domain reducers are invoked, without muddying those individual domains.

A beforeReduce enhancer for use with redux-reducer-factory that can meld previous and initial state to flesh out default state of partial state hydration (for example, when persisting only specific parts of your state tree to local storage)

A store enhancer to allow resetting the state based on a specific action

redux-list-reducer is a factory function for creating Redux reducers that operate on lists.

Simple reducer library for Redux. It's like Reselect but for reducers. By using aggressive memoization, reducers can depend on each others in an efficient way, without having to query Redux store. It works fine with time-travel debugging and server-side rendering, because reducers remains totally stateless pure functions. It permits to replace the imperative waitFor of original Flux implementation by a purely functional approach.

Reducer combinator that allows reducers to wait upon each other.

Incrementally load Redux reducers into a single store

An Redux enhancer for registering reducer by namespace

Actions

Action Creation Utilities

Flux Standard Action utilities for Redux.

Wrapper for redux-actions to easily add namespaces to action types.

Batching action creator and associated higher order reducer for redux that enables batching subscriber notifications for an array of actions. Semi-similar use case as redux-batched-subscribe.

This is a utility for injecting actions in redux. The idea came from having a huge project with actions all over the place. What if we treated actions like routes and made a file with a list of them?

Sugar library for creating Redux or Flux actions.

Includes utility functionx to generate simple and dynamic actions.

Shortcut for making normal and async action types.

Create actions based on objects with functions

A simple wrapper around async redux actions.

Utilities and conventions for managing Redux (or Flux) actions. Co-locate your action types and action creators and keep them DRY, automatically dispatch follow-up actions when your async actions complete, validate arguments sent to each actionCreator

Allows definition of actions by passing named reducers in an object

A utility to create auto-typed Redux actions from an object.

Create thunk generator to dispatch Flux-Standard-Action in each phase of Promise.

API Action Creators for Redux

Helpers for creating FSA compatible actions.

Utility functions to generate action name triplets for CRUD ops.

Other Action Use Cases

An experimental module for representing Redux actions as events. In this model, reducers become observers, switch statements become event listeners, and dispatch() emits events.

SmartActions add a layer on top of actions to do things depending on whether an action would modify the state. When a SmartAction is called, it returns an object instead of dispatching immediately. The returned object tells you whether executing it would change the state, and a method to execute it.

An undo stack for redux. It works by storing incremental changes instead of entire states, which is optimal when working with large data. It works in combination with SmartActions.

Queue actions when offline and dispatch them when getting back online

Store

Store Persistence

Persist and rehydrate a redux store. The core idea behind redux-persist is to provide performant persistence and rehydration methods. At the same time redux-persist is designed to minimize complexity by knowing as little about your application as possible.

Add cross tab syncing to your redux app with 1 line. This tiny module listens to the window for redux-persist storage events. When an event occurs it will dispatch a rehydrate action.

Store enhancer that syncs (a subset) of your Redux store state to localstorage.

Custom slicer for redux-localstorage that allows reducers to define their own persistence configuration.

Enhancer for redux-localstorage that allows you to persist an immutable store

Persistence layer for redux with flexible backends. Save and load the Redux state with ease.

Sync store state to pouchdb

Redux One Way Linking. This is a simple method for supporting offline sync. The basic concept is, try to execute the action, on failure add it to a retry queue. Every so often process the retry queue until success is achieved.

Redux Live a framework for persisting Redux actions to a database and synchronising them across multiple clients.

Save and load actions to persist state

Redux middleware for recording redux actions for a particular session to session storage

Middleware to persist your state in a Redux app.

Ridiculously simple implementation for serialising the entire Redux store to local storage and retrieving it on application restart.

https://github.com/baptistemanson/redux-...
Share redux state across the network between clients and servers

Store Change Subscriptions

Watch/observe/monitor Redux store state changes. Creates store subscription callbacks that can do comparisons based on object paths or Reselect selectors.

Subscribe to a path in your redux state atom. Uses a middleware shared path strings for improved performance and dynamic subscription handling.

Process changes in redux with path matching. Uses a higher-order reducer that does comparisons, and uses a path string with a matching syntax.

Observe Redux state changes and dispatch actions on change.

Redux middleware for observing state change and taking action when changes of interest occur.

Store enhancer for redux which allows batching of subscribe notifications that occur as a result of dispatches. Semi-similar use case as redux-batched-actions.

Batch React updates that occur as a result of Redux dispatches, to prevent cascading renders.

Delay dispatching an action until a condition is true.

Store enhancer for redux that enables skipping subscriber notifications for individual actions.

redux-store-observer provides a thin wrapper around Redux's store#subscribe() to allow you to respond to state changes.

A higher order component decorator to read from a Redux store without subscribing to all its changes

Redux Debounce Listener allows you to delay invoking listeners. If you use this with React, rendering cost may be reduced.

use redux as a through pull stream

Other

Store composition for redux. Lifting allows you to "lift" your state, reducers and actions into another context. Lifting is a kind of store enhancer that is a superset of middleware.

Advanced/Additional Redux Concepts

Immutable Data

Immutable Data Structures

Fully-featured data structures library that uses advanced internal data storage to efficiently manage modified references. Very widely used, but also rather complex.

Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects. Uses freezing.

Immutable and type-checked state and actions for Redux (built on tcomb library)

A TINY, fail-fast, lazy, "naked", simple immutable Javascript objects library.

Ice Dam: a very lightweight library to freeze data. Data is frozen at the edge, where your Flux container sends it to views.

Easily update nested frozen objects and arrays in a declarative and immutable manner.

Utilities for treating frozen JavaScript objects as persistent immutable collections

Immutable Update Utilities

A collection of functions to perform immutable operations on plain JavaScript objects and arrays. Like updeep but with batched mutations and no freezing. Like icepick, but with batched mutations and a curried API that puts the target object as the last argument. No freezing.

Simple module for reducing immutable nested properties in Redux applications.

Modify deep object properties without modifying the original object (immutability). Works great with React and Redux.

Immutable path is a simple micro library providing js object selectors and modifiers. Stick to immutability: modification always returns a new instance of the object. Free optin and optout: no need to wrap all your plain objects in classes, no init.

Persistent functional object updates on vanilla js data structures (wraps react-addons-update)

The motivation for this module is to have a simple utility for changing state in a React-Redux application without mutate existing state of plain JavaScript objects.

Sprout provides a set of functions to help you work with nested data without all the headaches. Sprout never mutates the original data but returns new versions. This way, plain JavaScript objects (and arrays) can be effectively treated as if they were immutable.

Traverse objects and arrays immutably. Scour is a general-purpose library for dealing with JSON trees. Use it to: manage your Redux datastore; provide a model layer to access data in your single-page app; navigate a large JSON tree easily; rejoice in having a lightweight alternative to Immutable.js.

Immutability helpers with fast reads and acceptable writes. Timm's approach: use plain objects and arrays and provide simple mutation functions that will probably not handle all edge cases.

Utilities for creating and merging immutable data trees. Friendly to functional programming. Only plain JS objects, no custom classes, no OOP, bring your own data.

A utility to handle common array manipulation reducer functions.

A set of commands for immutably updating data.

"React Immutability Helpers" most likely are going to be deprecated. This library is a drop-in replacement for p>

A set of commands for immutably updating data.

"React Immutability Helpers" most likely are going to be deprecated. This library is a drop-in replacement for x.js.org/docs/introduction/Ecosystem.html">Ecosystem page 以及 Awesome-Redux 列表, 并且包含了很多笔者自己搜集的项目列表。列举在某个具体的目录下的项目没有特定的顺序,只是按照我添加的顺序来。

Core Redux Concepts:核心的Redux概念

Reducers

Reducer Utilities

一个用于将多个单独的Redux Reducer合并为一个单独的Key的Reducer。

按照从左到右的顺序来合并Reducers

用于定义清晰的带有类型检查的Action Payloads,基于Redux Duck Paradigm。

以结构化方式组织Reducers

Create a redux reducer from an object of action handling functions, keyed by the actions they handle. Has createReducer.compose(fns) helper function to combine multiple action handlers into a single action.

Redux reducer that maps over an object of action types.

A utility to create Redux reducers from simple objects.

A utility to create Redux reducers which only respond to prefixed actions.

reducer-chain helps you to chain redux reducers with given state and action, then keep last updated state.

reducer-pipe helps you to pipe redux reducers with given state and action, passing previously returned state to next reducer, then keep last updated state.

reducer-sandbox helps you to reuse your redux reducers in different place without conflict them.

Publishing createReducer from Redux's Reducing Boilerplate page.

Remove redux reducer boilerplate

This library is intended to provide a little more object-oriented approach to write reducers. All it does is provide Reducer and CombineReducers classes to get rid of switch-case. Additionally it also lets you modify reducers dynamically.

A small library for writing redux actions with less boilerplate using classes.

Slightly more concise reducer switching for Flux Standard Actions.

Functions to easily build redux reducers without boilerplate code.

Reducer manager, it can be used as a replace for switch in Redux reducers

A personal preference for building reducers for Redux.

A way to combine reducers by their dependencies and access at their ancestor's values.

Another attempt to reuse your reducers, inspired from multireducer

Like Redux's combineReducers, but more better! Allows definition of nested reducers and multiple top-level reducers.

Higher-Order Reducers

Higher order reducer to add undo/redo functionality to redux state containers

Higher-order reducer to ignore redux actions

Higher-order reducer to reset the redux state on certain actions

Optimistically apply actions that can be later commited or reverted.

A reducer enhancer to enable type-agnostic optimistic updates

Higher-order reducer for store entities received from gaearon's normalizr and makes it easy to handle them.

Higher order cache reducer

Provides a higher-order reducer for managing multiple instances of the same redux state subtree.

A redux higher order reducer to simplify the state of fetched data.

Advanced Reducer Use Cases

https://medium.com/@matt.krick/solving-r...
https://medium.com/@matt.krick/introduci...
Adds additional logic to reducers to handle ordering of reducer handling, dynamic state creation, and display of reducer behavior in the Redux DevTools.

A component model for Redux state trees based on the React.js component model and other familiar design patterns from the React ecosystem. Allows creation of "reducer components" that can be dynamically added and removed, and targeted with scoped actions.

A configurable createReducer factory (i.e. it is a factory for making a createReducer function) that essentially allows projects to insert extra generic reducers (enhancers) before and after individual domain reducers are invoked, without muddying those individual domains.

A beforeReduce enhancer for use with redux-reducer-factory that can meld previous and initial state to flesh out default state of partial state hydration (for example, when persisting only specific parts of your state tree to local storage)

A store enhancer to allow resetting the state based on a specific action

redux-list-reducer is a factory function for creating Redux reducers that operate on lists.

Simple reducer library for Redux. It's like Reselect but for reducers. By using aggressive memoization, reducers can depend on each others in an efficient way, without having to query Redux store. It works fine with time-travel debugging and server-side rendering, because reducers remains totally stateless pure functions. It permits to replace the imperative waitFor of original Flux implementation by a purely functional approach.

Reducer combinator that allows reducers to wait upon each other.

Incrementally load Redux reducers into a single store

An Redux enhancer for registering reducer by namespace

Actions

Action Creation Utilities

Flux Standard Action utilities for Redux.

Wrapper for redux-actions to easily add namespaces to action types.

Batching action creator and associated higher order reducer for redux that enables batching subscriber notifications for an array of actions. Semi-similar use case as redux-batched-subscribe.

This is a utility for injecting actions in redux. The idea came from having a huge project with actions all over the place. What if we treated actions like routes and made a file with a list of them?

Sugar library for creating Redux or Flux actions.

Includes utility functionx to generate simple and dynamic actions.

Shortcut for making normal and async action types.

Create actions based on objects with functions

A simple wrapper around async redux actions.

Utilities and conventions for managing Redux (or Flux) actions. Co-locate your action types and action creators and keep them DRY, automatically dispatch follow-up actions when your async actions complete, validate arguments sent to each actionCreator

Allows definition of actions by passing named reducers in an object

A utility to create auto-typed Redux actions from an object.

Create thunk generator to dispatch Flux-Standard-Action in each phase of Promise.

API Action Creators for Redux

Helpers for creating FSA compatible actions.

Utility functions to generate action name triplets for CRUD ops.

Other Action Use Cases

An experimental module for representing Redux actions as events. In this model, reducers become observers, switch statements become event listeners, and dispatch() emits events.

SmartActions add a layer on top of actions to do things depending on whether an action would modify the state. When a SmartAction is called, it returns an object instead of dispatching immediately. The returned object tells you whether executing it would change the state, and a method to execute it.

An undo stack for redux. It works by storing incremental changes instead of entire states, which is optimal when working with large data. It works in combination with SmartActions.

Queue actions when offline and dispatch them when getting back online

Store

Store Persistence

Persist and rehydrate a redux store. The core idea behind redux-persist is to provide performant persistence and rehydration methods. At the same time redux-persist is designed to minimize complexity by knowing as little about your application as possible.

Add cross tab syncing to your redux app with 1 line. This tiny module listens to the window for redux-persist storage events. When an event occurs it will dispatch a rehydrate action.

Store enhancer that syncs (a subset) of your Redux store state to localstorage.

Custom slicer for redux-localstorage that allows reducers to define their own persistence configuration.

Enhancer for redux-localstorage that allows you to persist an immutable store

Persistence layer for redux with flexible backends. Save and load the Redux state with ease.

Sync store state to pouchdb

Redux One Way Linking. This is a simple method for supporting offline sync. The basic concept is, try to execute the action, on failure add it to a retry queue. Every so often process the retry queue until success is achieved.

Redux Live a framework for persisting Redux actions to a database and synchronising them across multiple clients.

Save and load actions to persist state

Redux middleware for recording redux actions for a particular session to session storage

Middleware to persist your state in a Redux app.

Ridiculously simple implementation for serialising the entire Redux store to local storage and retrieving it on application restart.

https://github.com/baptistemanson/redux-...
Share redux state across the network between clients and servers

Store Change Subscriptions

Watch/observe/monitor Redux store state changes. Creates store subscription callbacks that can do comparisons based on object paths or Reselect selectors.

Subscribe to a path in your redux state atom. Uses a middleware shared path strings for improved performance and dynamic subscription handling.

Process changes in redux with path matching. Uses a higher-order reducer that does comparisons, and uses a path string with a matching syntax.

Observe Redux state changes and dispatch actions on change.

Redux middleware for observing state change and taking action when changes of interest occur.

Store enhancer for redux which allows batching of subscribe notifications that occur as a result of dispatches. Semi-similar use case as redux-batched-actions.

Batch React updates that occur as a result of Redux dispatches, to prevent cascading renders.

Delay dispatching an action until a condition is true.

Store enhancer for redux that enables skipping subscriber notifications for individual actions.

redux-store-observer provides a thin wrapper around Redux's store#subscribe() to allow you to respond to state changes.

A higher order component decorator to read from a Redux store without subscribing to all its changes

Redux Debounce Listener allows you to delay invoking listeners. If you use this with React, rendering cost may be reduced.

use redux as a through pull stream

Other

Store composition for redux. Lifting allows you to "lift" your state, reducers and actions into another context. Lifting is a kind of store enhancer that is a superset of middleware.

Advanced/Additional Redux Concepts

Immutable Data

Immutable Data Structures

Fully-featured data structures library that uses advanced internal data storage to efficiently manage modified references. Very widely used, but also rather complex.

Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects. Uses freezing.

Immutable and type-checked state and actions for Redux (built on tcomb library)

A TINY, fail-fast, lazy, "naked", simple immutable Javascript objects library.

Ice Dam: a very lightweight library to freeze data. Data is frozen at the edge, where your Flux container sends it to views.

Easily update nested frozen objects and arrays in a declarative and immutable manner.

Utilities for treating frozen JavaScript objects as persistent immutable collections

Immutable Update Utilities

A collection of functions to perform immutable operations on plain JavaScript objects and arrays. Like updeep but with batched mutations and no freezing. Like icepick, but with batched mutations and a curried API that puts the target object as the last argument. No freezing.

Simple module for reducing immutable nested properties in Redux applications.

Modify deep object properties without modifying the original object (immutability). Works great with React and Redux.

Immutable path is a simple micro library providing js object selectors and modifiers. Stick to immutability: modification always returns a new instance of the object. Free optin and optout: no need to wrap all your plain objects in classes, no init.

Persistent functional object updates on vanilla js data structures (wraps react-addons-update)

The motivation for this module is to have a simple utility for changing state in a React-Redux application without mutate existing state of plain JavaScript objects.

Sprout provides a set of functions to help you work with nested data without all the headaches. Sprout never mutates the original data but returns new versions. This way, plain JavaScript objects (and arrays) can be effectively treated as if they were immutable.

Traverse objects and arrays immutably. Scour is a general-purpose library for dealing with JSON trees. Use it to: manage your Redux datastore; provide a model layer to access data in your single-page app; navigate a large JSON tree easily; rejoice in having a lightweight alternative to Immutable.js.

Immutability helpers with fast reads and acceptable writes. Timm's approach: use plain objects and arrays and provide simple mutation functions that will probably not handle all edge cases.

Utilities for creating and merging immutable data trees. Friendly to functional programming. Only plain JS objects, no custom classes, no OOP, bring your own data.

A utility to handle common array manipulation reducer functions.

A set of commands for immutably updating data.