Once configured, Redux Clerk provides a set of selectors to easily access your data.
The dataset selector recomputes the derived data for the specified dataset. The dataset selector does not include optimistic updates to the store.
The Redux state provided in mapStateToProps
Type: object
The name of the dataset that should be used for computing the derived data.
Type: string
(must be A-Za-z_0-9)
Required: yes
Similar to the dataset
selector but includes optimistic updates to the store.
The Redux state provided in mapStateToProps
Type: object
The name of the dataset that should be used for computing the derived data.
Type: string
(must be A-Za-z_0-9)
Required: yes
The datasetProperty selector retrieves an individual property from an instance's additional data.
The Redux state provided in mapStateToProps
Type: object
The name of the dataset that should be used for computing the derived data.
Type: string
(must be A-Za-z_0-9)
Required: yes
The name of the property that should be retrieved.
Type: string
(must be A-Za-z_0-9)
Required: yes
The record selector retrieves an individual record by its uid. The record selector does not include optimistic update to the store.
The Redux state provided in mapStateToProps
Type: object
The unique id for the record.
Type: number
or string
Required: yes
Similar to the record
selector but includes optimistic updates to the store.
The Redux state provided in mapStateToProps
Type: object
The unique id for the record.
Type: number
or string
Required: yes
import { selectors } from 'redux-clerk'
const todosSelectors = selectors({
// Tell us where to find the base state for the related redux-clerk reducer.
baseSelector: state => state.todos
})
export default todosSelectors