The library for web and native user interfaces.
Mirrored from https://github.com/247TaxiDriver/QOS-React.git
Synced Nov 13, 18:15 UTC
[patch][babel] check babel identifier before lowering to HoistedConst
Same babel identifier issue as #2510 but for HoistedConst Not sure how we should best test this -- one possibility is using constant prop. Currently, we have false positives for HoistedConst that prevent constant propagation. I don't want to over-rotate on babel apis tests in our fixtures (instead of semantically interesting ones) ```js // input function Component() { { x: 4 }; const x = 2; return x; } // output function Component() { const $ = useMemoCache(1); let x; if ($[0] === Symbol.for("react.memo_cache_sentinel")) { x = 2; $[0] = x; } else { x = $[0]; } return x; } ```