Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export interface IDrone {
- id: string;
- name: string;
- }
- export const featureAdapter: EntityAdapter<IDrone> = createEntityAdapter<IDrone>({
- selectId: model => model.id,
- });
- export const initialState: State = featureAdapter.getInitialState({
- selectedDrone: null,
- isLoading: false,
- error: null
- });
- export const getDroneById = (id: string): IDrone => featureAdapter.selectId(id);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement