Last active
November 14, 2019 01:08
-
-
Save duanebester/7f28e948fe59655bdf87f7b416439dd7 to your computer and use it in GitHub Desktop.
Reducer Interface Example
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 interface Bucket { | |
notes: string; | |
id?: string; | |
} | |
export interface UpdateNotesPayload { | |
targetIndex: number; | |
value: string; | |
} | |
export interface UpdateNotesAction { | |
type: 'updateNotes'; | |
payload: UpdateNotesPayload; | |
} | |
export interface AddAction { | |
type: 'addBucket'; | |
} | |
export type Action = | |
| AddAction | |
| UpdateNotesAction; | |
export interface State { | |
buckets: Bucket[]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment