Created
October 24, 2017 14:56
-
-
Save danielpowell4/490248199b5b815618b71821d3caef0c to your computer and use it in GitHub Desktop.
Starting shape of new react/redux note app
This file contains 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
notes: { | |
byId: { // object keyed by Id | |
noteId: { | |
id: noteId, | |
content: noteContent, | |
... | |
} | |
}, | |
creationForm: { | |
context: { // authorName / authorAvatar and permissions | |
authorName: "String Jenkins", | |
permission1: false, | |
... | |
}, | |
display: { // show hide form and spinner/error data | |
showForm: false, | |
isFetching: bool, | |
... | |
}, | |
}, | |
isEditting: { // Controls note edit form | |
id: idBeingingEditted, | |
isSubmitting: isEditFormSubmittingBool | |
}, | |
isFetching: false, // used to show spinner for initial load of first notes + filters | |
errorMessage: "", // used to populate alert | |
filters: { | |
active: "activeFilterName", // used to grab the collection of active notes | |
byName: { // object keyed by filterName that stores filter-specific data | |
filterName1: { | |
name: filterName1, | |
isFetching: bool, | |
lastFetchedAt: unixTimestamp, | |
noteIds: [noteId1, noteId2, noteId3...], | |
totalCount: noteCountFromAPI | |
}, | |
... | |
}, | |
allFilters: [filterName1, filterName2, ...] // used to populate the dropdown select | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment