Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

How to read and display the current dataset being loaded on the desk.

3 replies
Last updated: Sep 27, 2023
Hi all. I would like to read and display the current dataset being loaded on the desk. Is there a way to read the current dataset?
Sep 26, 2023, 3:57 PM
👋 What context are you trying to display it in? Most config options receive the dataset in their arguments while the
useDataset
hook can be used in React components.
Sep 26, 2023, 4:16 PM
Just used the
useDataset
hook but it only lists all the datasets.
Trying to have it show what dataset was deployed.
Sep 26, 2023, 4:24 PM
Upgrading to v3 handled this. Thanks
Sep 27, 2023, 1:39 PM

Sanity– build remarkable experiences at scale

Sanity is a modern 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?