MCPcopy Index your code
hub / github.com/nodegui/react-nodegui / createInstance

Method createInstance

src/components/Image/index.ts:11–24  ·  view source on GitHub ↗
(
    newProps: ImageProps,
    rootInstance: AppContainer,
    context: any,
    workInProgress: Fiber
  )

Source from the content-addressed store, hash-verified

9 return true;
10 }
11 createInstance(
12 newProps: ImageProps,
13 rootInstance: AppContainer,
14 context: any,
15 workInProgress: Fiber
16 ): RNImage {
17 const widget = new RNImage();
18 widget.setProperty("scaledContents", true);
19 widget.setProps(newProps, {});
20 widget.addEventListener(WidgetEventTypes.Resize, () => {
21 widget.scalePixmap(widget.size());
22 });
23 return widget;
24 }
25 commitMount(
26 instance: RNImage,
27 newProps: ImageProps,

Callers

nothing calls this directly

Calls 2

setPropsMethod · 0.95
scalePixmapMethod · 0.95

Tested by

no test coverage detected