🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

Issue with Sanity preview in Next.js site resolved with documentation

4 replies
Last updated: May 21, 2024
Hello, Love to get some suggestions & ideas for an issue i am having.
I have added the feature sanity preview of a nextjs site. it seems working well at first. Then i ran into an issue, where for example, i have a homepage document which referencing a product document.

• if i change anything in homepage document content then check on preview i can see the update
• But if change anything on that product document i referenced in homepage document the changes isn't shown in preview
i understand that
In Sanity, references always point to the published version of a document
Is there a way i can solve the issue i am having.Thanks in advance
May 21, 2024, 12:18 AM
What perspective are you using in your client configuration in your site?
May 21, 2024, 12:21 AM
sorry, rd. can you please elaborate your question for me?
May 21, 2024, 12:25 AM
Hmm, i am looking into this. Your point gave me things to look into
https://www.sanity.io/docs/presenting-and-previewing-content#5bdb577beb57
May 21, 2024, 12:30 AM
thanks
user M
. I was able to make it work.All thanks to you.I need to go through sanity doc a little i missed this part.
May 21, 2024, 3:21 AM

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?