mirror of
https://github.com/facebook/react.git
synced 2026-02-26 04:04:59 +00:00
12 lines
272 B
JavaScript
12 lines
272 B
JavaScript
// arrayInstance.push should have the following effects:
|
|
// - read on all args (rest parameter)
|
|
// - mutate on receiver
|
|
function Component(props) {
|
|
const x = foo(props.x);
|
|
const y = { y: props.y };
|
|
const arr = [];
|
|
arr.push({});
|
|
arr.push(x, y);
|
|
return arr;
|
|
}
|