MCPcopy Create free account
hub / github.com/TechniqueSoftware/react-json-schema / createComponent

Method createComponent

lib/ReactJsonSchema.js:30–36  ·  view source on GitHub ↗
(schema)

Source from the content-addressed store, hash-verified

28 }
29
30 createComponent(schema) {
31 // eslint-disable-next-line no-unused-vars
32 const { component, children, text, ...rest } = schema;
33 const Component = this.resolveComponent(schema);
34 const Children = typeof text !== 'undefined' ? text : this.resolveComponentChildren(schema);
35 return createElement(Component, rest, Children);
36 }
37
38 resolveComponent(schema) {
39 const componentMap = this.getComponentMap();

Callers 2

parseSchemaMethod · 0.95

Calls 2

resolveComponentMethod · 0.95

Tested by

no test coverage detected