-
Notifications
You must be signed in to change notification settings - Fork 85
Description
#8570 implemented the V2 Entity view with PDF and many of the interactions related to it.
We keep many elements of the UI state as url search parameters (panel config, page, pdf view mode) and have been trying to avoid react-router from triggering the data loaders when interactions in the UI trigger an update of those parameters.
By default react-router considers that any change in the search parameters should tirgger a re-fetching of all the routes data. This is inconvenient for obvious reasons.
We manage to control that refetching a bit with a 'shouldRevalidate' prop on the route definition, but every change that we make to the new route breaks it. This is likely not the best way to control data re-fetching and it seems we are just fighting the expected behavior of react-router.
We need to review how to properly achieve:
- A url with user friendly and readable parameters for UI stats for tabs, page, pfd view mode.
- A straightforward way of avoiding re-fetching on tab change, view mode change, page change.
- Retain control over imperative data refetching via revalidate() function.