Can we do asynchronous data fetching in our preview.prepare statement?

3 replies
Last updated: Sep 14, 2023
Can we do asynchronous data fetching in our preview.prepare statement?
We have run into an interesting case with work where we need to do this in certain situations and we are having a hard time with it
Sep 14, 2023, 5:50 PM
No, you need to use a custom preview component if you need to do anything async.
Sep 14, 2023, 5:53 PM
Thanks!
Sep 14, 2023, 5:54 PM
You’re welcome!
Sep 14, 2023, 5:54 PM

Sanity– build remarkable experiences at scale

The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?