A setup to reproduce a missing publish button in Sanity Studio v3 when rendered by React 18 in StrictMode
during development.
# add projectId to environment
echo "VITE_SANITY_PROJECT_ID=\"[PROJECT_ID]\"" >> .env.local
# install and run
npm i
npm run dev
// open browser at http://localhost:5173/desk/item
Select or create an item. The publish button will not be visible for the Studio rendered inside React’s StrictMode
(top).
# add projectId to environment
echo "VITE_SANITY_PROJECT_ID=\"[PROJECT_ID]\"" >> .env.local
# install and run
npm i
npm run build
npm run preview
// open browser at http://localhost:4173/desk/item
Select or create an item. The publish button will be visible in both Studio instances.
# add projectId to environment
echo "VITE_SANITY_PROJECT_ID=\"[PROJECT_ID]\"" >> .env.local
# checkout v17 setup
git checkout react-v17
# install and run
npm i
npm run dev
// open browser at http://localhost:5173/desk/item
Select or create an item. The publish button will be visible in both Studio instances.