Home Identifier Source Repository
public class | source

CountableStore

Extends:

FluxMapStoreBaseStore → CountableStore

A base class for resource stores that are countable (have /count.json endpoints).

Constructor Summary

Public Constructor
public

constructor(dispatcher: APIDispatcher, actions: Actions)

Method Summary

Public Methods
public

Returns the count for the given query

public

reduce(state: *, action: *): *

Inherited Summary

From class BaseStore
public

areEqual(state1: object, state2: object): boolean

Determines whether or not the state of this store has changed.

public

reduce(state: object, action: object): object

Used to reduce a stream of actions coming from the dispatcher into a

public

Queries the store for resources matching the source object

Public Constructors

public constructor(dispatcher: APIDispatcher, actions: Actions) source

Override:

BaseStore#constructor

Params:

NameTypeAttributeDescription
dispatcher APIDispatcher

The dispatcher to register with

actions Actions

Public Methods

public count(query: ResourceQuery): number source

Returns the count for the given query

Params:

NameTypeAttributeDescription
query ResourceQuery
  • optional

Return:

number

public reduce(state: *, action: *): * source

Override:

BaseStore#reduce

Params:

NameTypeAttributeDescription
state *
action *

Return:

*