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