MCPcopy
hub / github.com/mridgway/hoist-non-react-statics / getStatics

Function getStatics

src/index.js:52–60  ·  view source on GitHub ↗
(component)

Source from the content-addressed store, hash-verified

50TYPE_STATICS[Memo] = MEMO_STATICS;
51
52function getStatics(component) {
53 // React v16.11 and below
54 if (isMemo(component)) {
55 return MEMO_STATICS;
56 }
57
58 // React v16.12 and above
59 return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
60}
61
62const defineProperty = Object.defineProperty;
63const getOwnPropertyNames = Object.getOwnPropertyNames;

Callers 1

hoistNonReactStaticsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected