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

Structure and Patterns - How Do You All Loop Over Your Arrays of Different Objects?

2 replies
Last updated: Mar 16, 2021
Speaking of structure and patterns – how do you all loop over your Arrays of different Objects? I had come up with a much messier version of this in the past. But then was thinking about it like how
works and think it’s much cleaner.
Mar 15, 2021, 5:22 PM
I actually use this pattern a lot, so created a function to handle this! Its the renderObjectArray function in https://www.npmjs.com/package/sanity-react-extra
Mar 16, 2021, 5:35 AM
Mar 16, 2021, 5: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?