Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import { Reducer, ApplicationState, Action } from "../store.types";
  2.  
  3. export const deletePostRequestReducer: Reducer = (
  4. previousState: ApplicationState,
  5. action: Action<string> // action.payload = post id
  6. ): ApplicationState => ({
  7. ...previousState,
  8. deletingPosts: {
  9. ...previousState.deletingPosts,
  10. [action.payload]: true
  11. }
  12. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement