-
Notifications
You must be signed in to change notification settings - Fork 0
Usage
Alexis Brodeur edited this page Mar 15, 2018
·
1 revision
In a Duck
import { createHelpers } from 'redux-entities'
export type User =
{ id: string
, email: string
, firstName: string
, lastName: string
, avatarUrl: string
, token: string
}
export const {
actions: {
setEntities: setUsers
setEntity: setUser,
unsetEntities: unsetUsers,
unsetEntity: unsetUser
},
selectors: {
getEntities: getUsers,
getEntities: getUsersSafe,
getEntity: getUser,
hasEntity: hasUser
}
} = createHelpers<User>('user')