Commit Graph

3 Commits

Author SHA1 Message Date
Lauren Tan 46d7f4f8af Synchronize symbol names with React
In the upstream useMemoCache PR this symbol got renamed and unexpectedly caused 
a RN crash. Synchronize it so the comparison works.
2022-10-17 16:07:50 -04:00
Lauren Tan b03752cbe0 Use for loop instead of Array.prototype.fill
Some prior [microbenchmarking](https://jsbench.me/7ol98ws520/1) showed that a 
for loop outperformed `fill` (which is about ~60% slower). This is the same 
approach we use in the latest useMemoCache PR
2022-10-17 16:07:50 -04:00
Jan Kassens 90e189ae82 Add react-forget-runtime
This is a new module that holds: 

- the `useMemoCache` stub (hopefully to be deleted next week) 

- various helpers that can be imported by the compiler, e.g. the dispatcher 
guard `$startLazy` 

- skipped the implementation of `makeReadOnly` for now as there's already 
multiple copies and I wanted to avoid typescript in this file for now to make 
the build easier (i.e. no build)
2022-10-17 13:08:34 -04:00