MCPcopy
hub / github.com/lit/lit / ReactiveController

Interface ReactiveController

packages/reactive-element/src/reactive-controller.ts:53–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 * calling `requestUpdate()` on the host.
52 */
53export interface ReactiveController {
54 /**
55 * Called when the host is connected to the component tree. For custom
56 * element hosts, this corresponds to the `connectedCallback()` lifecycle,
57 * which is only called when the component is connected to the document.
58 */
59 hostConnected?(): void;
60
61 /**
62 * Called when the host is disconnected from the component tree. For custom
63 * element hosts, this corresponds to the `disconnectedCallback()` lifecycle,
64 * which is called the host or an ancestor component is disconnected from the
65 * document.
66 */
67 hostDisconnected?(): void;
68
69 /**
70 * Called during the client-side host update, just before the host calls
71 * its own update.
72 *
73 * Code in `update()` can depend on the DOM as it is not called in
74 * server-side rendering.
75 */
76 hostUpdate?(): void;
77
78 /**
79 * Called after a host update, just before the host calls firstUpdated and
80 * updated. It is not called in server-side rendering.
81 *
82 */
83 hostUpdated?(): void;
84}

Callers 12

hostConnectedMethod · 0.65
_connectedMethod · 0.65
addControllerFunction · 0.65
connectedCallbackFunction · 0.65
hostDisconnectedMethod · 0.65
_disconnectedMethod · 0.65
disconnectedCallbackFunction · 0.65
_updateMethod · 0.65
performUpdateFunction · 0.65
_updatedMethod · 0.65
_$didUpdateFunction · 0.65

Implementers 14

TestControllerpackages/labs/react/src/test/use-contr
TestControllerpackages/react/src/test/use-controller
MyControllerpackages/reactive-element/src/test/rea
MyControllerpackages/benchmarks/reactive-element/l
ResizeControllerpackages/labs/observers/src/resize-con
MutationControllerpackages/labs/observers/src/mutation-c
IntersectionControllerpackages/labs/observers/src/intersecti
PerformanceControllerpackages/labs/observers/src/performanc
Routespackages/labs/router/src/routes.ts
LocalizeControllerpackages/localize/src/internal/localiz
ContextProviderpackages/context/src/lib/controllers/c
ContextConsumerpackages/context/src/lib/controllers/c

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…