(component: Component)
| 37 | } |
| 38 | |
| 39 | function 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 | |
| 55 | export function makeClassComponentObserver( |
| 56 | componentClass: ComponentClass<any, any> |
no test coverage detected
searching dependent graphs…