Dmytro 🇺🇦
dkotkin.bsky.social
Dmytro 🇺🇦
@dkotkin.bsky.social
The thing is, UI (form) should still work even when fetch failed.
I'll try to play around with error boundary and see if it may help.
Thanks anyway!

My only concern - it's super easy to fall into similar case and gives an impression of a fragile app 😬
December 20, 2024 at 9:08 AM
Hi @tkdodo.eu 👋
I created a dummy example here - codesandbox.io/p/sandbox/wn...

You can uncomment a line that throws in `src/query/useGetData` to see the issue (need to reload the preview due to staleTime)
codesandbox.io
December 20, 2024 at 8:49 AM
I'll try to prepare some sandbox and will come back to you. Thank you 🤗
December 19, 2024 at 6:58 PM
Btw, thanks for answering 🙇‍♂️
Very much appreciated 😊
December 19, 2024 at 5:56 PM
We have staleTime: 30s. We fetch query in parent to show Skeleton for the form and use data to prefil it. However, when fetching fails - we still show the form but empty. Therefore, encountered infinite refetch issue.
Fixed with prop drilling but it doesn't feel very good to me...
December 19, 2024 at 5:54 PM