(fn: () => void)
| 576 | } |
| 577 | |
| 578 | subscribe(fn: () => void) { |
| 579 | this.subscriptions.add(fn); |
| 580 | // Ensure that React reads the collection if we re-subscribe after updates were |
| 581 | // already queued. When a hidden Activity is revealed, child nodes re-attach and call |
| 582 | // queueUpdate before we can re-subscribe, so the notification is lost. |
| 583 | if (this.queuedRender) { |
| 584 | fn(); |
| 585 | } |
| 586 | return (): boolean => this.subscriptions.delete(fn); |
| 587 | } |
| 588 | |
| 589 | resetAfterSSR(): void { |
| 590 | if (this.isSSR) { |
no test coverage detected