Files
863c75147c fix: support JSXFrament in react-constant-elements transform (#16582)
* fix: plugin react-constant-elements transform JSXFrament not add container

* test: add a jsx-in-frament test case for plugin-react-constant-elements

* feat: hoist JSXFragment if possible

* add more test cases

---------

Co-authored-by: Huáng Jùnliàng <[email protected]>
2024-07-27 08:58:22 -04:00

5 lines
86 B
JavaScript

var _span;
function C(x) {
return <div x={x}>{_span || (_span = <span />)}</div>;
}