Open minht11 opened 3 days ago
Loading spinners are bad, it less disruptive to show users previous data until new data is ready. Suspense is somewhat based on that idea.
Have code like this:
const { data } = useQuery({ key: () => ['item', props.selectedItemId], query: () => getItemById(props.selectedItemId), })
when props.selectedItemId changes current behavior of useQuery forces me to show blank screen because data does not exist, I wish data would not be reset while isFetching is true.
It’s normal it’s not kept by default. But maybe a placeholder option could add this
Notes:
placeholderData: (previousData) => Data
success
Loading spinners are bad, it less disruptive to show users previous data until new data is ready. Suspense is somewhat based on that idea.
Have code like this:
when props.selectedItemId changes current behavior of useQuery forces me to show blank screen because data does not exist, I wish data would not be reset while isFetching is true.