The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
import { proxy, useSnapshot } from 'valtio'
export const menuState = proxy({
// values
menuActiveRefId: 'home',
// set states
setMenuActiveRefId: (value) => {
menuState.menuActiveRefId = value
},
menuMobileOpen: false,
setMenuMobileOpen: (value) => {
menuState.menuMobileOpen = value
},
})
export const useMenuActiveRefId = () => {
return useSnapshot(menuState).menuActiveRefId
}
export const useMenuMobileOpen = () => {
return useSnapshot(menuState).menuMobileOpen
}