To keep previous page state in ‘documents’ when it is needed. / It can enhance user experience.
Any background context you want to provide?
This is my first PR in this repository, so I have low understanding of the project.
I think maybe this is not the best practice and someone can solve this issue in a better way.
Btw about router’s state property, I could pass only boolean type flag value to prevent data fetching in useEffect.
However, for better scalability, I actually passed previous projectName and implemented it comparing with current projectName.
This approach will prevent errors if projectName changes only in client-side without using router in the future.
What are the relevant tickets?
Fixes #100
Checklist
[x] Added relevant tests or not required
[x] Didn't break anything
I don’t know If I should make additional relevant tests.
And I’m not sure this PR didn’t break anything, but maybe it is..
Let me know if someone have any questions or would like me to make any additional revisions.
What this PR does / why we need it?
To keep previous page state in ‘documents’ when it is needed. / It can enhance user experience.
Any background context you want to provide?
This is my first PR in this repository, so I have low understanding of the project. I think maybe this is not the best practice and someone can solve this issue in a better way.
Btw about router’s
state
property, I could pass only boolean type flag value to prevent data fetching in useEffect. However, for better scalability, I actually passed previous projectName and implemented it comparing with current projectName. This approach will prevent errors if projectName changes only in client-side without using router in the future.What are the relevant tickets?
Fixes #100
Checklist
I don’t know If I should make additional relevant tests. And I’m not sure this PR didn’t break anything, but maybe it is..
Let me know if someone have any questions or would like me to make any additional revisions.