Open mihilt opened 1 year ago
As #33, it seems to be better way to handle pagination through query string. However, as I checked, the isForward
property seems to be enforced to fetch documents list on the server.
I'm not sure, maybe I didn't understand it perfectly, but to get the document list from Yorkie, I checked that it needs through 'ListDocuments' call in admin package from Yorkie.
However, for this purpose, to get list of documents for specific area, the values 'previousID' and 'isForward' should be needed, and since it is such a structure, there seems to be no way to get list with only 'page' information.
Description: As time went by, I began to realize that this PR(#114) causes ‘documents’ managed by redux to be lost when refreshing browser.
https://user-images.githubusercontent.com/50368758/236391307-0bd41bd7-190d-48f8-bc12-b5a22e9ed469.mp4
This is because, when browser is refreshed, state of the history object has persistence, but redux cannot maintain its redux store.
Not only refreshing browser, but user also can request
~/projects/:projectName/documents/:documentKey
directly without clicking, so without fetching data inside useEffect was a problematic approach.Maybe the attempt to solve issue with using ‘state’ of react-router was also bad approach from the beginning.
Why: