MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / useSecretForm

Function useSecretForm

packages/react/src/plugins/secret-form.tsx:76–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74const SecretFormContext = createContext<SecretFormContextValue | null>(null);
75
76function useSecretForm(): SecretFormContextValue {
77 const ctx = use(SecretFormContext);
78 if (!ctx) {
79 // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: React context invariant surfaces programmer misuse during render
80 throw new Error("SecretForm parts must be rendered inside <SecretForm.Provider>");
81 }
82 return ctx;
83}
84
85// ---------------------------------------------------------------------------
86// Provider

Callers 5

NameFieldFunction · 0.85
IdFieldFunction · 0.85
ValueFieldFunction · 0.85
ErrorBannerFunction · 0.85
SubmitButtonFunction · 0.85

Calls 1

useFunction · 0.50

Tested by

no test coverage detected