Skip to content

Commit

Permalink
Import react
Browse files Browse the repository at this point in the history
  • Loading branch information
kadikraman committed May 17, 2024
1 parent c178cfb commit cd0142c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/react-compiler-runtime/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// 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!
*
* 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: number) {
export function c(size) {
return React.useState(() => {
const $ = new Array(size);
for (let ii = 0; ii < size; ii++) {
Expand Down

0 comments on commit cd0142c

Please sign in to comment.