MCPcopy
hub / github.com/puckeditor/puck / useIsFocused

Function useIsFocused

packages/core/components/AutoField/lib/use-is-focused.ts:3–5  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

1import { useAppStore } from "../../../store";
2
3export const useIsFocused = (path: string) => {
4 return useAppStore((s) => s.state.ui.field.focus === path);
5};

Callers 1

useLocalValueFunction · 0.90

Calls 1

useAppStoreFunction · 0.90

Tested by

no test coverage detected