mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
s/useMemoCache/unstable_useMemoCache
uMC is still prefixed with unstable in React (https://github.com/facebook/react/blob/653dd2348ccfd7bfa4e11d814e247ed3ff7c5fa7/packages/react/src/React.js#L143)
This commit is contained in:
@@ -49,7 +49,7 @@ export function codegenReactiveFunction(
|
||||
t.callExpression(
|
||||
t.memberExpression(
|
||||
t.identifier("React"),
|
||||
t.identifier("useMemoCache")
|
||||
t.identifier("unstable_useMemoCache")
|
||||
),
|
||||
[]
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ function component() {
|
||||
|
||||
```javascript
|
||||
function component() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let x;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
const z = [];
|
||||
|
||||
@@ -17,7 +17,7 @@ function component() {
|
||||
|
||||
```javascript
|
||||
function component() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let z;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
z = [];
|
||||
|
||||
@@ -27,7 +27,7 @@ function mutate(x, y) {}
|
||||
|
||||
```javascript
|
||||
function foo(cond) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== cond;
|
||||
let a;
|
||||
if (c_0) {
|
||||
|
||||
@@ -17,7 +17,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
const c_1 = $[1] !== b;
|
||||
const c_2 = $[2] !== c;
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ function g(props) {
|
||||
|
||||
```javascript
|
||||
function g(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.c;
|
||||
let a;
|
||||
if (c_0) {
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ function foo() {
|
||||
|
||||
```javascript
|
||||
function foo() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let a;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
a = [[1]];
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ function g() {
|
||||
|
||||
```javascript
|
||||
function g() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let x;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
x = { y: { z: 1 } };
|
||||
|
||||
@@ -14,7 +14,7 @@ function component(t) {
|
||||
|
||||
```javascript
|
||||
function component(t) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const a = t.a;
|
||||
const c_0 = $[0] !== a;
|
||||
let y;
|
||||
|
||||
@@ -21,7 +21,7 @@ function Component(props) {
|
||||
function foo() {}
|
||||
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let a;
|
||||
let b;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
|
||||
@@ -20,7 +20,7 @@ function component(a, b) {
|
||||
|
||||
```javascript
|
||||
function component(a, b) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== b;
|
||||
let y;
|
||||
if (c_0) {
|
||||
|
||||
@@ -20,7 +20,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -46,7 +46,7 @@ function getNativeLogFunction(level) {
|
||||
|
||||
```javascript
|
||||
function getNativeLogFunction(level) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== level;
|
||||
let t0;
|
||||
if (c_0) {
|
||||
|
||||
@@ -18,7 +18,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let z;
|
||||
if (c_0) {
|
||||
|
||||
@@ -16,7 +16,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let z;
|
||||
if (c_0) {
|
||||
|
||||
@@ -19,7 +19,7 @@ function component(a, b) {
|
||||
|
||||
```javascript
|
||||
function component(a, b) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== b;
|
||||
let y;
|
||||
if (c_0) {
|
||||
|
||||
@@ -18,7 +18,7 @@ function component(a, b) {
|
||||
|
||||
```javascript
|
||||
function component(a, b) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== b;
|
||||
let y;
|
||||
if (c_0) {
|
||||
|
||||
@@ -17,7 +17,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -19,7 +19,7 @@ function component(a, b) {
|
||||
|
||||
```javascript
|
||||
function component(a, b) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
const c_1 = $[1] !== b;
|
||||
let x;
|
||||
|
||||
@@ -16,7 +16,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let z;
|
||||
if (c_0) {
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let z;
|
||||
if (c_0) {
|
||||
|
||||
@@ -16,7 +16,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let z;
|
||||
if (c_0) {
|
||||
|
||||
@@ -16,7 +16,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let t0;
|
||||
if (c_0) {
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let t0;
|
||||
if (c_0) {
|
||||
|
||||
@@ -16,7 +16,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let t0;
|
||||
if (c_0) {
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let z;
|
||||
if (c_0) {
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let z;
|
||||
if (c_0) {
|
||||
|
||||
@@ -17,7 +17,7 @@ function foo() {
|
||||
|
||||
```javascript
|
||||
function foo() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let z;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
const x = { x: 0 };
|
||||
|
||||
@@ -35,7 +35,7 @@ function Component(props) {
|
||||
|
||||
```javascript
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const items = props.items;
|
||||
const maxItems = props.maxItems;
|
||||
const c_0 = $[0] !== maxItems;
|
||||
|
||||
@@ -16,7 +16,7 @@ function component(a, b) {
|
||||
|
||||
```javascript
|
||||
function component(a, b) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
const c_1 = $[1] !== b;
|
||||
let x;
|
||||
|
||||
@@ -14,7 +14,7 @@ function component() {
|
||||
|
||||
```javascript
|
||||
function component() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let t0;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
t0 = useState(0);
|
||||
|
||||
@@ -65,7 +65,7 @@ function ComponentD(props) {
|
||||
* props.b does *not* influence `a`
|
||||
*/
|
||||
function ComponentA(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.a;
|
||||
const c_1 = $[1] !== props.b;
|
||||
const c_2 = $[2] !== props.d;
|
||||
@@ -92,7 +92,7 @@ function ComponentA(props) {
|
||||
* props.b *does* influence `a`
|
||||
*/
|
||||
function ComponentB(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.a;
|
||||
const c_1 = $[1] !== props.b;
|
||||
const c_2 = $[2] !== props.c;
|
||||
@@ -121,7 +121,7 @@ function ComponentB(props) {
|
||||
* props.b *does* influence `a`, but only in a way that is never observable
|
||||
*/
|
||||
function ComponentC(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.a;
|
||||
const c_1 = $[1] !== props.b;
|
||||
const c_2 = $[2] !== props.c;
|
||||
@@ -151,7 +151,7 @@ function ComponentC(props) {
|
||||
* props.b *does* influence `a`
|
||||
*/
|
||||
function ComponentD(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.a;
|
||||
const c_1 = $[1] !== props.b;
|
||||
const c_2 = $[2] !== props.c;
|
||||
|
||||
@@ -35,7 +35,7 @@ function mayMutate() {}
|
||||
|
||||
```javascript
|
||||
function ComponentA(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.p0;
|
||||
const c_1 = $[1] !== props.p1;
|
||||
const c_2 = $[2] !== props.p2;
|
||||
@@ -74,7 +74,7 @@ function ComponentA(props) {
|
||||
}
|
||||
|
||||
function ComponentB(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.p0;
|
||||
const c_1 = $[1] !== props.p1;
|
||||
const c_2 = $[2] !== props.p2;
|
||||
|
||||
@@ -16,7 +16,7 @@ function foo() {
|
||||
|
||||
```javascript
|
||||
function foo() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let y;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
y = 0;
|
||||
|
||||
@@ -17,7 +17,7 @@ function foo() {
|
||||
|
||||
```javascript
|
||||
function foo() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let y;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
y = 0;
|
||||
|
||||
@@ -21,7 +21,7 @@ function Component(props) {
|
||||
function Foo() {}
|
||||
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let a;
|
||||
let b;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
|
||||
@@ -18,7 +18,7 @@ function foo(props) {
|
||||
|
||||
```javascript
|
||||
function foo(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.max;
|
||||
let y;
|
||||
if (c_0) {
|
||||
|
||||
@@ -23,7 +23,7 @@ function foo(a, b) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -24,7 +24,7 @@ function foo(x, y, z) {
|
||||
|
||||
```javascript
|
||||
function foo(x, y, z) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const items = [z];
|
||||
items.push(x);
|
||||
const c_0 = $[0] !== x;
|
||||
|
||||
@@ -27,7 +27,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
|
||||
const g = a[1][0].e.f;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const d = a[0];
|
||||
const f = a[1][0].e.f;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
const c_1 = $[1] !== b;
|
||||
const c_2 = $[2] !== c;
|
||||
|
||||
@@ -21,7 +21,7 @@ function foo(props) {
|
||||
|
||||
```javascript
|
||||
function foo(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let y;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
y = 0;
|
||||
|
||||
@@ -19,7 +19,7 @@ function foo(x) {}
|
||||
|
||||
```javascript
|
||||
function Component() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let a;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
a = [];
|
||||
|
||||
@@ -26,7 +26,7 @@ function useFreeze() {}
|
||||
function foo() {}
|
||||
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let x;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
x = [];
|
||||
|
||||
@@ -19,7 +19,7 @@ function call(x) {}
|
||||
|
||||
```javascript
|
||||
function Component() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let a;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
a = [];
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ function call(x) {}
|
||||
|
||||
```javascript
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const cond = props.cond;
|
||||
const x = props.x;
|
||||
const c_0 = $[0] !== cond;
|
||||
|
||||
@@ -56,7 +56,7 @@ function Foo() {}
|
||||
* return = <Foo a={a} b={b} />
|
||||
*/
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.a;
|
||||
const c_1 = $[1] !== props.b;
|
||||
const c_2 = $[2] !== props.c;
|
||||
|
||||
@@ -38,7 +38,7 @@ function Foo() {}
|
||||
* return = <Foo a={a} b={b} />
|
||||
*/
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.a;
|
||||
let a;
|
||||
if (c_0) {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
const c_1 = $[1] !== b;
|
||||
const c_2 = $[2] !== c;
|
||||
|
||||
@@ -20,7 +20,7 @@ function foo(a, b) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -45,7 +45,7 @@ function Foo() {}
|
||||
* return = <Foo a={a} b={b} />
|
||||
*/
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.a;
|
||||
const c_1 = $[1] !== props.b;
|
||||
const c_2 = $[2] !== props.c;
|
||||
|
||||
@@ -37,7 +37,7 @@ function Foo() {}
|
||||
* return = <Foo a={a} b={b} />
|
||||
*/
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.a;
|
||||
const c_1 = $[1] !== props.b;
|
||||
let a;
|
||||
|
||||
@@ -20,7 +20,7 @@ function foo(a, b, c, d) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c, d) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
const c_1 = $[1] !== b;
|
||||
const c_2 = $[2] !== c;
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ function MyApp(props) {
|
||||
```javascript
|
||||
// This caused an infinite loop in the compiler
|
||||
function MyApp(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let y;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
y = makeObj();
|
||||
|
||||
@@ -19,7 +19,7 @@ function Foo(props) {
|
||||
|
||||
```javascript
|
||||
function Foo(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let t0;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
t0 = <>Text</>;
|
||||
|
||||
@@ -14,7 +14,7 @@ function Component(props) {
|
||||
|
||||
```javascript
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props;
|
||||
let t0;
|
||||
if (c_0) {
|
||||
|
||||
@@ -19,7 +19,7 @@ function component(props) {
|
||||
|
||||
```javascript
|
||||
function component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props;
|
||||
let t0;
|
||||
if (c_0) {
|
||||
|
||||
@@ -14,7 +14,7 @@ function component(props) {
|
||||
|
||||
```javascript
|
||||
function component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props;
|
||||
let t0;
|
||||
if (c_0) {
|
||||
|
||||
@@ -22,7 +22,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -19,7 +19,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -18,7 +18,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -41,7 +41,7 @@ function mutate() {}
|
||||
function cond() {}
|
||||
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const a = {};
|
||||
const b = {};
|
||||
let c;
|
||||
|
||||
@@ -18,7 +18,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let y;
|
||||
if (c_0) {
|
||||
|
||||
@@ -19,7 +19,7 @@ function foo(a, b, c, d) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c, d) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== b;
|
||||
const c_1 = $[1] !== c;
|
||||
let x;
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ function foo(a, b, c, d) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c, d) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== b;
|
||||
const c_1 = $[1] !== c;
|
||||
let x;
|
||||
|
||||
@@ -20,7 +20,7 @@ function foo(a, b, c, d) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c, d) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const x = someObj();
|
||||
const c_0 = $[0] !== a;
|
||||
let x$0;
|
||||
|
||||
@@ -14,7 +14,7 @@ function component({ a, b }) {
|
||||
|
||||
```javascript
|
||||
function component(t8) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const a = t8.a;
|
||||
const b = t8.b;
|
||||
const c_0 = $[0] !== a;
|
||||
|
||||
@@ -16,7 +16,7 @@ function Foo(props) {
|
||||
|
||||
```javascript
|
||||
function Foo(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
const c_1 = $[1] !== b;
|
||||
const c_2 = $[2] !== c;
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
const c_1 = $[1] !== b;
|
||||
const c_2 = $[2] !== c;
|
||||
|
||||
@@ -20,7 +20,7 @@ function component(a) {
|
||||
|
||||
```javascript
|
||||
function component(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -16,7 +16,7 @@ function component(a, b) {
|
||||
|
||||
```javascript
|
||||
function component(a, b) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
const c_1 = $[1] !== b;
|
||||
let z;
|
||||
|
||||
@@ -17,7 +17,7 @@ function Component(props) {
|
||||
|
||||
```javascript
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.p0;
|
||||
let x;
|
||||
let child;
|
||||
|
||||
@@ -18,7 +18,7 @@ function foo() {
|
||||
|
||||
```javascript
|
||||
function foo() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let x;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
x = {};
|
||||
|
||||
@@ -20,7 +20,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
const c_1 = $[1] !== b;
|
||||
const c_2 = $[2] !== c;
|
||||
|
||||
@@ -19,7 +19,7 @@ function f(a, b) {
|
||||
|
||||
```javascript
|
||||
function f(a, b) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a.length;
|
||||
const c_1 = $[1] !== b;
|
||||
let x;
|
||||
|
||||
@@ -23,7 +23,7 @@ function Component(props) {
|
||||
|
||||
```javascript
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.p0;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -34,7 +34,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -21,7 +21,7 @@ function Component(props) {
|
||||
|
||||
```javascript
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== props.p0;
|
||||
const c_1 = $[1] !== props.p1;
|
||||
let y;
|
||||
|
||||
@@ -18,7 +18,7 @@ function foo() {}
|
||||
|
||||
```javascript
|
||||
function sequence(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
Math.max(1, 2);
|
||||
let t0;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
|
||||
@@ -21,7 +21,7 @@ function foo() {
|
||||
```javascript
|
||||
function mutate() {}
|
||||
function foo() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let c$1;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
const b = {};
|
||||
|
||||
@@ -15,7 +15,7 @@ function component() {
|
||||
|
||||
```javascript
|
||||
function component() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let x;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
x = function (a) {
|
||||
|
||||
@@ -13,7 +13,7 @@ function foo(a) {
|
||||
|
||||
```javascript
|
||||
function foo(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a.b;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -15,7 +15,7 @@ export default function foo(x, y) {
|
||||
|
||||
```javascript
|
||||
export default function foo(x, y) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
if (x) {
|
||||
const c_0 = $[0] !== y;
|
||||
let t0;
|
||||
|
||||
@@ -15,7 +15,7 @@ function Component(props) {
|
||||
|
||||
```javascript
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const a = 1;
|
||||
const b = 2;
|
||||
let x;
|
||||
|
||||
@@ -25,7 +25,7 @@ function Component(props) {
|
||||
function foo() {}
|
||||
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let a;
|
||||
let b;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
|
||||
@@ -21,7 +21,7 @@ function Component(props) {
|
||||
function foo() {}
|
||||
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let a;
|
||||
let b;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
|
||||
@@ -16,7 +16,7 @@ function foo() {
|
||||
|
||||
```javascript
|
||||
function foo() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let x;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
x = 1;
|
||||
|
||||
@@ -16,7 +16,7 @@ function foo() {
|
||||
|
||||
```javascript
|
||||
function foo() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let x;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
x = 1;
|
||||
|
||||
@@ -19,7 +19,7 @@ function foo(a, b, c) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const x = a;
|
||||
if (b) {
|
||||
const c_0 = $[0] !== c;
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ function foo(a, b, c, d, e) {
|
||||
|
||||
```javascript
|
||||
function foo(a, b, c, d, e) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const x = null;
|
||||
const c_0 = $[0] !== a;
|
||||
const c_1 = $[1] !== b;
|
||||
|
||||
@@ -19,7 +19,7 @@ function Component(props) {
|
||||
function Foo() {}
|
||||
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
let c;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
const a = [];
|
||||
|
||||
@@ -22,7 +22,7 @@ function foo() {
|
||||
|
||||
```javascript
|
||||
function foo() {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const x = 1;
|
||||
|
||||
const y = 3;
|
||||
|
||||
@@ -15,7 +15,7 @@ function Component(props) {
|
||||
|
||||
```javascript
|
||||
function Component(props) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const a = 1;
|
||||
const b = 2;
|
||||
let x;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ function foo(a) {
|
||||
|
||||
```javascript
|
||||
function foo(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -20,7 +20,7 @@ function foo(a) {
|
||||
|
||||
```javascript
|
||||
function foo(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
@@ -21,7 +21,7 @@ function foo(a) {
|
||||
|
||||
```javascript
|
||||
function foo(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ function foo(a) {
|
||||
|
||||
```javascript
|
||||
function foo(a) {
|
||||
const $ = React.useMemoCache();
|
||||
const $ = React.unstable_useMemoCache();
|
||||
const c_0 = $[0] !== a;
|
||||
let x;
|
||||
if (c_0) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user