MCPcopy
hub / github.com/danilowoz/react-content-loader / createComponent

Function createComponent

__mocks__/react-native-svg.js:3–12  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

1import React from 'react';
2
3const createComponent = function(name) {
4 return class extends React.Component {
5 // overwrite the displayName, since this is a class created dynamically
6 static displayName = name;
7
8 render() {
9 return React.createElement(name, this.props, this.props.children);
10 }
11 };
12};
13
14// Mock all react-native-svg exports
15// from https://github.com/magicismight/react-native-svg/blob/master/index.js

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…