-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to disable React Suspense per useQuery
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
"@evolu/common-react": minor | ||
--- | ||
|
||
Allow to disable React Suspense per useQuery | ||
|
||
React Suspense is enabled by default but can be optionally disabled | ||
per useQuery hook. When disabled, useQuery will not stop rendering | ||
and will return empty rows instead. | ||
|
||
That can be helpful to avoid waterfall when using more than one | ||
useQuery within one React Component. In such a situation, disable | ||
Suspense for all useQuery hooks except the last one. | ||
|
||
Because Evolu queues queries within a microtask sequentially, all | ||
queries will be batched within one roundtrip. | ||
|
||
Another use case is to optimistically prefetch data that might be | ||
needed in a future render without blocking the current render. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e392fe8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
evolu – ./
evolu.vercel.app
www.evolu.dev
evolu-evolu.vercel.app
evolu-git-main-evolu.vercel.app
evolu.dev