mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
parent
3a5b326d81
commit
d85f86cf01
|
|
@ -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 }],
|
|
||||||
};
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user