0.0.9 • Published 3 years ago

redukers v0.0.9

Weekly downloads
39
License
ISC
Repository
github
Last release
3 years ago

Redukers

Downloads Version License Dependencies Size

Reusable Redux atoms. Provides composable data structures in form of a reducer and its accompanying selectors.

Concepts

Reduker

A reducer creator and a set of selectors to access its internal state. The created reducer reacts to actions matching the configured Patterns (see below).

Redukers are very minimal, and intended to handle a small slice of state (a particular data structure). The application state is therefore grown by composing there redukers (or other custom reducers) manually or via combineReducers.

Patterns

Redukers can be defined to react to specific actions via Patterns. A Pattern can be a string (i.e. an action type to react to), an Array<string> (i.e. an array of action types to react to) or a predicate (action: Action) => boolean that returns true if it should react to the action.

type Pattern =
  | string
  | Array<string>
  | ((action: Action) => boolean)

Flux Standard Actions

https://github.com/redux-utilities/flux-standard-action

Modules

See each module for in-depth documentation:

  • value: Holds a single value.

    WARNING: This module cannot hold undefined values (see https://redux.js.org/recipes/structuring-reducers/initializing-state#summary). Use null, false or other appropriate value instead.

  • entities: Holds a collection of keyed entities. Keys are unique values used to identify and access an entity (usually an id).

  • request: Holds the state of a single request (usually a network fetch).

  • requestById: Holds the state of a collection of request (usually a network fetch).

  • utils: Various convenience utilities to reduce Redux boilerplate or create your own redukers.

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.5

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

4 years ago