👀 Our most exciting product launch yet 🚀 Join us May 8th for Sanity Connect

Best practice for naming schema documents in Sanity.io

2 replies
Last updated: Oct 18, 2023
Hey all, would it be best practice to have all schema documents named
.jsx
or
.tsx
or should I only use those for more dynamic schemas?
Oct 17, 2023, 9:01 PM
Only needed if you plan to have inline JSX syntax. It’s probably “cleaner” to keep JSX components outside of the schema type files.
This is because we use Vite under the hood, and
it’s opinonated about this stuff .
Oct 17, 2023, 11:53 PM
user Y
Sounds good! Thanks for clearing that up for me:)
Oct 18, 2023, 5:05 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?