MCPcopy
hub / github.com/adobe/react-spectrum / subscribe

Method subscribe

packages/react-aria/src/collections/Document.ts:578–581  ·  view source on GitHub ↗
(fn: () => void)

Source from the content-addressed store, hash-verified

576 }
577
578 subscribe(fn: () => void) {
579 this.subscriptions.add(fn);
580 return (): boolean => this.subscriptions.delete(fn);
581 }
582
583 resetAfterSSR(): void {
584 if (this.isSSR) {

Callers 2

useCollectionDocumentFunction · 0.45
ToastContainerFunction · 0.45

Calls 2

deleteMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected