diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-11-23 16:20:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-23 16:20:24 -0800 |
commit | 32bf8122e8c8a0fbadd53b8a015cfbc9014519a2 (patch) | |
tree | 55bd24596e6fadadbf4326b26e3d14e418c5c7bb /lib/react-compiler-runtime | |
parent | 523d1f01a51c0e85e49916fb42b204f7004ffac1 (diff) | |
parent | b4d07c4112b9a62b5380948051aa4a7fd391a2d4 (diff) | |
download | voidsky-32bf8122e8c8a0fbadd53b8a015cfbc9014519a2.tar.zst |
Merge branch 'main' into main
Diffstat (limited to 'lib/react-compiler-runtime')
-rw-r--r-- | lib/react-compiler-runtime/index.js | 21 | ||||
-rw-r--r-- | lib/react-compiler-runtime/package.json | 9 |
2 files changed, 0 insertions, 30 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] -} diff --git a/lib/react-compiler-runtime/package.json b/lib/react-compiler-runtime/package.json deleted file mode 100644 index cb8f78bd5..000000000 --- a/lib/react-compiler-runtime/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "react-compiler-runtime", - "version": "0.0.1", - "license": "MIT", - "main": "index.js", - "peerDependencies": { - "react": "^18.2.0" - } -} \ No newline at end of file |