MCPcopy
hub / github.com/swagger-api/swagger-ui / useComponent

Function useComponent

src/core/plugins/json-schema-2020-12/hooks.js:19–22  ·  view source on GitHub ↗
(componentName)

Source from the content-addressed store, hash-verified

17}
18
19export const useComponent = (componentName) => {
20 const { components } = useContext(JSONSchemaContext)
21 return components[componentName] || null
22}
23
24export const useFn = (fnName = undefined) => {
25 const { fn } = useContext(JSONSchemaContext)

Callers 15

JSONSchema.jsxFile · 0.90
UnevaluatedPropertiesFunction · 0.90
PrefixItemsFunction · 0.90
ThenFunction · 0.90
UnevaluatedItemsFunction · 0.90
PropertyNamesFunction · 0.90
IfFunction · 0.90
ContainsFunction · 0.90
OneOfFunction · 0.90
ContentSchemaFunction · 0.90
AdditionalPropertiesFunction · 0.90
$defsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…