-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduced ConnectDispatch and apiDataCacheReducer. Organizing organized API data into ‘apiDataCache’ dictionary. (and more) #21
Conversation
…zed API data into ‘apiDataCache’ dictionary. Temporarily forcing react-query to always go to the network while we stabilize new data flow. Still upgrading Questionnaire to new approach. Still reviewing and moving edit mutations into models folder. Commented out many console.log lines. Reordered attributes in TextFields in EditPersonForm to alphabetical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The good thing about leaving one log line at the top of App.js, is it allows us to detect if we are restarting the app. If you see too many of them, it is a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this causes endless loop, there most likely is a problem in a useEffect after a query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still seems like a wasteful pattern. If you have the person object that is current enough to display it, why would you extract the id, and look the person up again in the function. I think this should be fixed now, so it does get propagated by copying the pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems broken, the passed in parameters in useFetchData are for search parameters on the API URL (or post params after my next checkin). Are you sure this is doing what you wanted? It might be the cause of other problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refetching can't be the right way to go. I'm sure it fixes the symptoms, but destroys one of the key values in ReactQuery ... serving api queries from cache. This needs to be solved before we go on, and copy that pattern elsewhere. I can work on this.
Introduced ConnectDispatch and apiDataCacheReducer. Organizing organized API data into ‘apiDataCache’ dictionary. Temporarily forcing react-query to always go to the network while we stabilize new data flow. Still upgrading Questionnaire to new approach. Still reviewing and moving edit mutations into models folder. Commented out many console.log lines. Reordered attributes in TextFields in EditPersonForm to alphabetical.