MCPcopy Index your code
hub / github.com/mobxjs/mobx / getAdministration

Function getAdministration

packages/mobx-react/src/observerClass.ts:39–53  ·  view source on GitHub ↗
(component: Component)

Source from the content-addressed store, hash-verified

37}
38
39function getAdministration(component: Component): ObserverAdministration {
40 // We create administration lazily, because we can't patch constructor
41 // and the exact moment of initialization partially depends on React internals.
42 // At the time of writing this, the first thing invoked is one of the observable getter/setter (state/props/context).
43 return (component[administrationSymbol] ??= {
44 reaction: null,
45 mounted: false,
46 reactionInvalidatedBeforeMount: false,
47 forceUpdate: null,
48 name: getDisplayName(component.constructor as ComponentClass),
49 state: undefined,
50 props: undefined,
51 context: undefined
52 })
53}
54
55export function makeClassComponentObserver(
56 componentClass: ComponentClass<any, any>

Callers 4

createReactiveRenderFunction · 0.70
getFunction · 0.70
setFunction · 0.70

Calls 1

getDisplayNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…