MCPcopy Create free account
hub / github.com/BetaSu/big-react / createInstance

Function createInstance

packages/react-dom/src/hostConfig.ts:11–16  ·  view source on GitHub ↗
(type: string, props: Props)

Source from the content-addressed store, hash-verified

9
10// export const createInstance = (type: string, props: any): Instance => {
11export const createInstance = (type: string, props: Props): Instance => {
12 // TODO 处理props
13 const element = document.createElement(type) as unknown;
14 updateFiberProps(element as DOMElement, props);
15 return element as DOMElement;
16};
17
18export const appendInitialChild = (
19 parent: Instance | Container,

Callers 1

completeWorkFunction · 0.90

Calls 1

updateFiberPropsFunction · 0.90

Tested by

no test coverage detected