Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. export interface IDrone {
  2. id: string;
  3. name: string;
  4. }
  5.  
  6. export const featureAdapter: EntityAdapter<IDrone> = createEntityAdapter<IDrone>({
  7. selectId: model => model.id,
  8. });
  9.  
  10. export const initialState: State = featureAdapter.getInitialState({
  11. selectedDrone: null,
  12. isLoading: false,
  13. error: null
  14. });
  15.  
  16. export const getDroneById = (id: string): IDrone => featureAdapter.selectId(id);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement