diff --git a/lib/react-compiler-runtime/index.js b/lib/react-compiler-runtime/index.js index f270739..c4c88b1 100644 --- a/lib/react-compiler-runtime/index.js +++ b/lib/react-compiler-runtime/index.js @@ -1,5 +1,6 @@ // lib/react-compiler-runtime.js const $empty = Symbol.for("react.memo_cache_sentinel"); +const React = require('react'); /** * DANGER: this hook is NEVER meant to be called directly! * @@ -7,7 +8,7 @@ const $empty = Symbol.for("react.memo_cache_sentinel"); * 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: number) { +export function c(size) { return React.useState(() => { const $ = new Array(size); for (let ii = 0; ii < size; ii++) {