How to access the langode in a custom component after the removal of withParent in Sanity v3.

3 replies
Last updated: Nov 6, 2023
I'm migrating a v2 instance to v3 and running into the following issue: We have a custom component for an input that uses withParent to get the language of the parent. Now with the removal of withParent how do I still access the langode?
Nov 3, 2023, 8:57 AM
Nov 3, 2023, 2:29 PM
useFormValue feels tricky at first because you have to test and see which path is going to make sense inside of it based on exactly where you're calling it from, but once you find it you can indeed use it reliably as a withParent substitute
Nov 3, 2023, 2:33 PM
Cool thanks, I'll try it out!
Nov 6, 2023, 7:38 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?