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
{{ message }}
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.
Some frameworks like Next performs data prefetching in the server-side, providing the initial data for the whole app. Libraries like swr and react-query takes advantage of this by using the prefetched data as the initial cache data and performs the fetch process/cache invalidation only on client-side.
Asset hydration helps because React SSR cannot handle nor does not support Suspense (CM, however, supports this) and since the asset is guaranteed to have an initial data, the component does not have to suspend during SSR and the potentially suspending component can safely present its success UI.
I think something like asset.hydrate(args, data) or useAsset(asset, args, initialData) is a good API. Thoughts?
The text was updated successfully, but these errors were encountered:
@drcmda I'm willing to, although I have yet to address some minor issues in the code (e.g. type unsoundness). I'll probably address those on a separate issue
edit:
Just saw @dai-shi 's commits, looks like the issues are fixed.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Some frameworks like Next performs data prefetching in the server-side, providing the initial data for the whole app. Libraries like
swr
andreact-query
takes advantage of this by using the prefetched data as the initial cache data and performs the fetch process/cache invalidation only on client-side.Asset hydration helps because React SSR cannot handle nor does not support Suspense (CM, however, supports this) and since the asset is guaranteed to have an initial data, the component does not have to suspend during SSR and the potentially suspending component can safely present its success UI.
I think something like
asset.hydrate(args, data)
oruseAsset(asset, args, initialData)
is a good API. Thoughts?The text was updated successfully, but these errors were encountered: