next-sanity 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -60,8 +60,8 @@ const apiVersion = process.env.NEXT_PUBLIC_SANITY_API_VERSION // "2022-11-16"
|
|
|
60
60
|
const client = createClient({
|
|
61
61
|
projectId,
|
|
62
62
|
dataset,
|
|
63
|
-
apiVersion,
|
|
64
|
-
useCdn: typeof document !== 'undefined',
|
|
63
|
+
apiVersion, // https://www.sanity.io/docs/api-versioning
|
|
64
|
+
useCdn: typeof document !== 'undefined', // server-side is statically generated, the CDN is only necessary beneficial if queries are called on-demand
|
|
65
65
|
})
|
|
66
66
|
|
|
67
67
|
const data = await client.fetch(groq`*[]`)
|
|
@@ -428,6 +428,9 @@ export const usePreview = definePreview({
|
|
|
428
428
|
dataset,
|
|
429
429
|
documentLimit: 10000,
|
|
430
430
|
includeTypes: ['page', 'product', 'sanity.imageAsset'],
|
|
431
|
+
// If you have a lot of editors changing content at the same time it might help to increase this value
|
|
432
|
+
// to reduce the amount of rerenders React have to perform.
|
|
433
|
+
subscriptionThrottleMs: 300,
|
|
431
434
|
})
|
|
432
435
|
```
|
|
433
436
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-sanity",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Sanity.io toolkit for Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"@sanity/client": "^3.4.1",
|
|
103
|
-
"@sanity/groq-store": "^1.1.
|
|
104
|
-
"@sanity/preview-kit": "^1.2.
|
|
103
|
+
"@sanity/groq-store": "^1.1.3",
|
|
104
|
+
"@sanity/preview-kit": "^1.2.7",
|
|
105
105
|
"groq": "^2.33.2"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|