forked from heejongahn/dramatic-note
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstoreSpec.js
More file actions
38 lines (34 loc) · 852 Bytes
/
storeSpec.js
File metadata and controls
38 lines (34 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Redux store spec for the app */
{
/*
* States below are stored in URL
*
* labelId: An id of currently selected label
* memoId: An id of currently selected memo
*/
/*
* labels: An object storing all labels
*/
labels: {
"1": {
"name" : "STRING - Label name",
"memoIds" : "[STRING] - A list of memos' Ids related with the label"
}
},
/*
* memos: An object storing all memos
*/
memos: {
"1": {
"title" : "STRING - Memo title",
"body" : "STRING - Memo body",
"modifiedAt" : "NUMBER - Last modified time in unix time",
"labelIds" : "[STRING] - A list of labels' Ids related with the memo"
}
},
checkedMemoIds: ["1", "2", "3", ...]
/* States below can be calculated using states above
*
* labelId + memos -> visibleMemos
*/
}