Skip to content

Instantly share code, notes, and snippets.

@argodeep
Created June 26, 2020 15:06
Show Gist options
  • Save argodeep/a78d885b120a2be436a339ffc38657c3 to your computer and use it in GitHub Desktop.
Save argodeep/a78d885b120a2be436a339ffc38657c3 to your computer and use it in GitHub Desktop.
Redux Actions
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
}
}
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