Commit 85730f5
committed
refactor(react): memoize getIsPassiveListenerSupported via IIFE
Convert the closure factory into an IIFE so the memoization state is
captured once at module load instead of per call. Also add a TODO to
abstract the global `window` reference behind an environment provider.1 parent 1dac68e commit 85730f5
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
0 commit comments