Created
June 26, 2020 15:06
-
-
Save argodeep/a78d885b120a2be436a339ffc38657c3 to your computer and use it in GitHub Desktop.
Redux Actions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { GET_CONTACTS, IS_SORTED } from './types'; | |
| import { User } from '../../models/user'; | |
| export const contactList = (contacts: User[]) => { | |
| return { | |
| type: GET_CONTACTS, | |
| data: contacts | |
| } | |
| } | |
| export const isSorted = (data: boolean) => { | |
| return { | |
| type: IS_SORTED, | |
| data: data | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const IS_SORTED = 'IS_SORTED'; | |
| export const GET_CONTACTS = 'GET_CONTACTS'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment