(fn: () => void)
| 597 | } |
| 598 | |
| 599 | subscribe(fn: () => void) { |
| 600 | this.subscriptions.add(fn); |
| 601 | // Ensure that React reads the collection if we re-subscribe after updates were |
| 602 | // already queued. When a hidden Activity is revealed, child nodes re-attach and call |
| 603 | // queueUpdate before we can re-subscribe, so the notification is lost. |
| 604 | if (this.queuedRender) { |
| 605 | fn(); |
| 606 | } |
| 607 | return (): boolean => this.subscriptions.delete(fn); |
| 608 | } |
| 609 | |
| 610 | resetAfterSSR(): void { |
| 611 | if (this.isSSR) { |
no test coverage detected