New useCreateDocument hook and auth error recovery

Published: June 24, 2026

v2.15.0

This release adds a new React hook for creating documents and fixes an issue where the auth error screen would not automatically recover after a session was restored.

Create documents with useCreateDocument

The new useCreateDocument hook gives you a way to create documents directly from your Sanity SDK app. Call the hook to get a create function, then invoke it with a document handle and optional initial content.

Additional options are available in the reference documentation.

🐛 Notable bugfixes and improvements

  • The auth error screen now automatically recovers when a session is restored, so users no longer need to manually reload after re-authenticating.
Loading...