# selectors

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](/redux-rest-easy/docs/api/createresource/selectors.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://brigad.gitbook.io/redux-rest-easy/docs/principles/selectors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
