redux-rest-easy
  • ⛳@brigad/redux-rest-easy
  • docs
    • api
      • reducer
      • createResource
        • actionsConfig
        • actions
        • selectors
      • connect
      • reducer
        • reducers
      • createResource
      • getPersistableState
      • initializeNetworkHelpers
      • reset
    • principles
      • persistence
      • actions
      • selectors
      • preflight
      • reducers
  • LICENSE
  • CHANGELOG
  • CODE_OF_CONDUCT
  • CONTRIBUTING
  • TODO
Powered by GitBook
On this page
  1. docs
  2. principles

selectors

PreviousactionsNextpreflight

Last updated 6 years ago

Selectors are functions which allow accessing any relevant information stored in the state. They are helpful, especially because redux-rest-easy state is generated and managed by the library itself.

There are 3 types of selectors :

  • linked to a request: helpful to map a component to the payload of a specific request

  • linked to a resource: helpful to map a component to a whole resource

  • linked to a resource Id: helpful to map a component to a single item

And for each type, here is a sneak peek of what information you can access:

  • the payload of the request/resource/resourceId

  • could we perform on the request/resource/Id

  • are we performing on the request/resource/Id

  • has the request/resource/Id succeeded

  • has the request/resource/Id failed

For a complete documentation on selectors, see the .

selectors documentation