about summary refs log tree commit diff
path: root/lib/react-compiler-runtime/index.js
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-10-30 02:47:39 +0000
committerGitHub <noreply@github.com>2024-10-30 02:47:39 +0000
commit1fc684aaef6dd851b4d6c9a23673fcf4e7170722 (patch)
tree69133e8c619646ab54b69a5dec6200070b1ada1f /lib/react-compiler-runtime/index.js
parenta22685c34542d43a71c3496df28e86207ec7fbed (diff)
downloadvoidsky-1fc684aaef6dd851b4d6c9a23673fcf4e7170722.tar.zst
React compiler beta and reenable rule (#5898)
* use react compiler beta and reenable rule

* use react-compiler-runtime

* error -> warn

* move runtime out of dev deps
Diffstat (limited to 'lib/react-compiler-runtime/index.js')
-rw-r--r--lib/react-compiler-runtime/index.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/react-compiler-runtime/index.js b/lib/react-compiler-runtime/index.js
deleted file mode 100644
index 44f80e0c9..000000000
--- a/lib/react-compiler-runtime/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-const React = require('react')
-const $empty = Symbol.for('react.memo_cache_sentinel')
-/**
- * DANGER: this hook is NEVER meant to be called directly!
- *
- * Note that this is a temporary userspace implementation of this function
- * from React 19. It is not as efficient and may invalidate more frequently
- * than the official API. Please upgrade to React 19 as soon as you can.
- **/
-export function c(size) {
-  // eslint-disable-next-line react-hooks/rules-of-hooks
-  return React.useState(() => {
-    const $ = new Array(size)
-    for (let ii = 0; ii < size; ii++) {
-      $[ii] = $empty
-    }
-    // @ts-ignore
-    $[$empty] = true
-    return $
-  })[0]
-}