mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
-47
@@ -1,47 +0,0 @@
|
||||
|
||||
## Input
|
||||
|
||||
```javascript
|
||||
import { mutate } from "shared-runtime";
|
||||
|
||||
function Component(a) {
|
||||
const x = { a };
|
||||
let obj = {
|
||||
method() {
|
||||
mutate(x);
|
||||
return x;
|
||||
},
|
||||
};
|
||||
return obj.method();
|
||||
}
|
||||
|
||||
export const FIXTURE_ENTRYPOINT = {
|
||||
fn: Component,
|
||||
params: [{ x: 1 }, { a: 2 }, { b: 2 }],
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
## Code
|
||||
|
||||
```javascript
|
||||
import { mutate } from "shared-runtime";
|
||||
|
||||
function Component(a) {
|
||||
const x = { a };
|
||||
const obj = {
|
||||
method() {
|
||||
mutate(x);
|
||||
return x;
|
||||
},
|
||||
};
|
||||
return obj.method();
|
||||
}
|
||||
|
||||
export const FIXTURE_ENTRYPOINT = {
|
||||
fn: Component,
|
||||
params: [{ x: 1 }, { a: 2 }, { b: 2 }],
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user