Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Reducer, ApplicationState, Action } from "../store.types";
- export const deletePostRequestReducer: Reducer = (
- previousState: ApplicationState,
- action: Action<string> // action.payload = post id
- ): ApplicationState => ({
- ...previousState,
- deletingPosts: {
- ...previousState.deletingPosts,
- [action.payload]: true
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement