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 page divided into three sections, each calling an API to get data for rendering. Because one of the APIs is very slow, I nested that section in React.Suspense to allow the user to see the page as soon as possible. However, I encountered a tricky problem. Suppose a user performs an operation on this page that triggers data modification. I can use revalidatePath in a server action or router.refresh on the client side to refresh the page. The issues I face are:
Due to a very slow API, the overall page refresh becomes very slow.
I cannot obtain a status indicating whether the current page is refreshing.
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
-
Summary
I have a page divided into three sections, each calling an API to get data for rendering. Because one of the APIs is very slow, I nested that section in React.Suspense to allow the user to see the page as soon as possible. However, I encountered a tricky problem. Suppose a user performs an operation on this page that triggers data modification. I can use revalidatePath in a server action or router.refresh on the client side to refresh the page. The issues I face are:
Has anyone else encountered similar problems?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions