Skip to content
Discussion options

You must be logged in to vote

This will be easier when the server support for Suspense is ready, but until then you can use react-ssr-prepass to do a prepass in the React element tree to find requests and resolve them. This is what libraries like urql do: https://github.com/FormidableLabs/urql/blob/master/packages/next-urql/src/with-urql-client.tsx#L112

Keep in mind this stuff is experimental and doing a second pass on the element tree will be slower than directly doing requests

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by andrewfairlie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants