-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Bug report
Description / Observed Behavior
When using swr suspense: true in use client; component wrapped in a suspense boundry. It always come out with that error console in server side, both in env of development and production.
I have try the followed ways to solve:
- add swr config - fallbackdata.
error disappear. But my component ui went wrong - first-time UI rendered with fallbackdata, then suspense fallback, finally the seccess-data fallback or error-fallback
- adjust component code with
isMountedstate checked(see thecomments partin screenshot that pasted),
I don't know what actually it happens, but it seems the ssr logic don't go through my component anymore, so it works. The problem is my component code is more complex now and i doubt that it got a worse performance.
Repro Steps / Code Example
- create a client-side comp with
suspense: trueswr using, wrapped in areact/Suspense - when the component mounted, the console error will show in node side.
Additional Context
versions:
swr: 2.3.3.
nextjs: 15.3.1
marlonschlosshauer
Metadata
Metadata
Assignees
Labels
No labels