You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a large list of items in Page [A].
The list of items is provided by the page's shadow endpoint.
The page will store the shadow endpoint in a local store.
Clicking on an item in this list brings the user to Page [B] where I show details of the selected item.
Now if hit the browser back button, I go back to Page [A].
However I notice that the browser performs a fetch request to __data.json to retrieve the props again for page [A] rendering.
Since the list is large, I'm trying to avoid refetching this list from the endpoint when navigating back to Page [A] when the user hits the browser back button.
Is there a way to avoid this fetch request when going back to this page, since I already have the data in my local store?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I have a large list of items in Page [A].
The list of items is provided by the page's shadow endpoint.
The page will store the shadow endpoint in a local store.
Clicking on an item in this list brings the user to Page [B] where I show details of the selected item.
Now if hit the browser back button, I go back to Page [A].
However I notice that the browser performs a fetch request to __data.json to retrieve the props again for page [A] rendering.
Since the list is large, I'm trying to avoid refetching this list from the endpoint when navigating back to Page [A] when the user hits the browser back button.
Is there a way to avoid this fetch request when going back to this page, since I already have the data in my local store?
Beta Was this translation helpful? Give feedback.
All reactions