mirror of
https://github.com/facebook/react.git
synced 2026-02-26 05:25:05 +00:00
20 lines
398 B
JavaScript
20 lines
398 B
JavaScript
/**
|
|
* Should produce 1 scope:
|
|
*
|
|
* return: inputs=props.a & props.b; outputs=return
|
|
* const a = compute(props.a);
|
|
* const b = compute(props.b);
|
|
* foo(a, b);
|
|
* return = <Foo a={a} b={b} />
|
|
*/
|
|
function Component(props) {
|
|
const a = compute(props.a);
|
|
const b = compute(props.b);
|
|
foo(a, b);
|
|
return <Foo a={a} b={b} />;
|
|
}
|
|
|
|
function compute() {}
|
|
function foo() {}
|
|
function Foo() {}
|