MCPcopy
hub / github.com/lit/lit / TestController

Class TestController

packages/react/src/test/use-controller_test.tsx:45–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 });
44
45 class TestController implements ReactiveController {
46 host: ReactiveControllerHost;
47 a: string;
48
49 log: Array<string> = [];
50
51 constructor(host: ReactiveControllerHost, a: string) {
52 this.host = host;
53 this.a = a;
54 host.addController(this);
55 ctorCallCount++;
56 }
57
58 hostConnected() {
59 this.log.push('connected');
60 }
61
62 hostDisconnected() {
63 this.log.push('disconnected');
64 }
65
66 hostUpdate() {
67 this.log.push('update');
68 }
69
70 hostUpdated() {
71 this.log.push('updated');
72 }
73 }
74
75 const useTest = (a: string) => {
76 return useController(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…