
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGreat question! You're actually looking at two different approaches to integrating Sanity with Nuxt, and understanding the difference will help you decide which path is best for your project.
What you have now (@sanity/client): You're using the core Sanity JavaScript client directly. This works perfectly fine and gives you full control over how you set up and use the client.
What nuxt-sanity offers: The nuxt-sanity module is a Nuxt-specific wrapper that provides:
nuxt.config.tsuseSanityQuery() for fetching dataWill they conflict? They won't necessarily conflict, but you'd be running two separate clients which is redundant. Here's what I'd recommend:
If your current setup with @sanity/client is working and you're comfortable with it, there's no urgent need to switch. However, if you want the benefits of Nuxt-native composables and cleaner integration, switching to nuxt-sanity would be worthwhile.
Migration approach: Instead of having both, I'd suggest replacing your current setup:
npx nuxi@latest module add sanitynuxt.config.ts:export default defineNuxtConfig({
modules: ["@nuxtjs/sanity"],
sanity: {
projectId: 'your-project-id',
dataset: 'production',
},
})sanityClient imports with the useSanityQuery() composable in your componentssanity.js file and @sanity/client dependency once everything's migratedThe nuxt-sanity module is essentially a convenience layer over the same @sanity/client you're already using, so you're not losing any functionalityājust gaining some Nuxt-specific ergonomics. The Nuxt.js quickstart guide has detailed examples of using the module if you decide to make the switch!
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store