ofType

A matcher to nail down your handler to a specific set of actions

import { ofType } from 'redux-fluent';

ofType(...types);

Arguments

  • variadic
  • string | { type: string } | { toString(): string } - the action types

Returns

({ 
  map: (handler) => Reducer,
})

Usage

Applies the mapFn if the given action matches with the expected types.

ofType('foo', 'bar', baz).map(mapFn)
  • applies mapFn if action.type is either foo, bar or baz.type | baz.toString()

results matching ""

    No results matching ""