I have a React dashboard displaying all users with an edit button that opens a popup. This popup loads dynamic data, such as available procedures for the user, which can change frequently.
Should I:
- Fetch the data before the popup is opened (risking stale data unless a hard refresh is performed).
- Fetch the data each time the popup is opened (ensuring up-to-date information but potentially slower popup load times).
I am having an argument with a senior in my office about which one to use.
I have insisted that we are not living in the PHP static pages era.
Also, since we are using React, our admin must as well be a Reactive application, even if that means using a little more of the server.
Please let me know your thoughts.