When multiple declarators are present in a declaration, we want to insert the constant element inside the declaration rather than placing it before because it may rely on a declarator inside that same declaration.
15 lines
274 B
JavaScript
15 lines
274 B
JavaScript
function render() {
|
|
const bar = "bar",
|
|
_ref = <foo bar={bar} />,
|
|
renderFoo = () => _ref;
|
|
|
|
return renderFoo();
|
|
}
|
|
|
|
function render() {
|
|
const bar = "bar",
|
|
renderFoo = () => <foo bar={bar} baz={baz} />,
|
|
baz = "baz";
|
|
|
|
return renderFoo();
|
|
} |