Is your feature request related to a problem? Please describe.
Currently for requests on PLP and PDP react-query uses keepPreviousData. This is great as long as you either navigate on a page this makes sense.
e.g.
on a PLP this works great for pagination
on a PDP this works great for selecting colors or sizes
but:
It feels very slow / laggy if you switch to a context there keepPreviousData does not make sense.
e.g.:
on a PLP switch to another category
on a PDP switch to another product (using the recommenders at the bottom) sample page: https://pwa-kit.mobify-storefront.com/global/en-GB/product/22416787M
In those cases it might make more sense to not keep the data and show skeletons instead.
Describe the solution you'd like
keepPreviousData should be set more dynamically and take into consideration if keeping the previous data really makes sense.
Is your feature request related to a problem? Please describe. Currently for requests on PLP and PDP react-query uses keepPreviousData. This is great as long as you either navigate on a page this makes sense. e.g. on a PLP this works great for pagination on a PDP this works great for selecting colors or sizes
but: It feels very slow / laggy if you switch to a context there keepPreviousData does not make sense. e.g.: on a PLP switch to another category on a PDP switch to another product (using the recommenders at the bottom) sample page: https://pwa-kit.mobify-storefront.com/global/en-GB/product/22416787M
In those cases it might make more sense to not keep the data and show skeletons instead.
Describe the solution you'd like keepPreviousData should be set more dynamically and take into consideration if keeping the previous data really makes sense.