UNPKG

sanity

Version:

Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches

8 lines (6 loc) 182 B
import {useState} from 'react' import {v4 as uuid} from 'uuid' export function usePanelId(id?: string): string { const [panelId] = useState(() => id || uuid()) return panelId }