Is atomWithQuery dependant on Suspense? #613
-
I'm using React version 16.8.6. When I'm trying to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Async atoms require
So, your simple question reveals some doc issues. Thanks for it. |
Beta Was this translation helpful? Give feedback.
Async atoms require
Suspense
(for lazy loading, experimental for data) and minimal requirement isreact
16.8 (no dependency onreact-dom
.) However, ReactDOMServer doesn't supportSuspense
, so it needs some techniques to avoid Suspense with async atoms in SSR. (It's like providing initial data, but documentation for SSR is still TODO.)atomWithQuery
is originally designed with async atoms, but afterwards @aulneau improved it. Now, withinitialData
, it doesn't depend on async atoms. (and it's not yet documented.)So, your simple question reveals some doc issues. Thanks for it.