-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
253 changed files
with
2,520 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
ecmascript/transforms/react/src/jsx/fixture/auto-import-react-source-type-module/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var x = ( | ||
<> | ||
<div> | ||
<div key="1" /> | ||
<div key="2" meow="wolf" /> | ||
<div key="3" /> | ||
<div {...props} key="4" /> | ||
</div> | ||
</> | ||
); |
3 changes: 3 additions & 0 deletions
3
...script/transforms/react/src/jsx/fixture/auto-import-react-source-type-module/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"runtime": "automatic" | ||
} |
14 changes: 14 additions & 0 deletions
14
ecmascript/transforms/react/src/jsx/fixture/auto-import-react-source-type-module/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { createElement as _createElement } from "react"; | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { Fragment as _Fragment } from "react/jsx-runtime"; | ||
|
||
var x = /*#__PURE__*/_jsx(_Fragment, { | ||
children: /*#__PURE__*/_jsxs("div", { | ||
children: [/*#__PURE__*/_jsx("div", {}, "1"), /*#__PURE__*/_jsx("div", { | ||
meow: "wolf" | ||
}, "2"), /*#__PURE__*/_jsx("div", {}, "3"), /*#__PURE__*/_createElement("div", { ...props, | ||
key: "4" | ||
})] | ||
}) | ||
}); |
15 changes: 15 additions & 0 deletions
15
ecmascript/transforms/react/src/jsx/fixture/complicated-scope-module/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const Bar = () => { | ||
const Foo = () => { | ||
const Component = ({thing, ..._react}) => { | ||
if (!thing) { | ||
var _react2 = "something useless"; | ||
var b = _react3(); | ||
var c = _react5(); | ||
var jsx = 1; | ||
var _jsx = 2; | ||
return <div />; | ||
}; | ||
return <span />; | ||
}; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
ecmascript/transforms/react/src/jsx/fixture/complicated-scope-module/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"runtime": "automatic" | ||
} |
25 changes: 25 additions & 0 deletions
25
ecmascript/transforms/react/src/jsx/fixture/complicated-scope-module/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { jsx as _jsx2 } from "react/jsx-runtime"; | ||
|
||
const Bar = () => { | ||
const Foo = () => { | ||
const Component = ({ | ||
thing, | ||
..._react | ||
}) => { | ||
if (!thing) { | ||
var _react2 = "something useless"; | ||
|
||
var b = _react3(); | ||
|
||
var c = _react5(); | ||
|
||
var jsx = 1; | ||
var _jsx = 2; | ||
return /*#__PURE__*/_jsx2("div", {}); | ||
} | ||
|
||
; | ||
return /*#__PURE__*/_jsx2("span", {}); | ||
}; | ||
}; | ||
}; |
2 changes: 2 additions & 0 deletions
2
ecmascript/transforms/react/src/jsx/fixture/import-source-pragma/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/** @jsxImportSource baz */ | ||
var x = (<div><span /></div>); |
6 changes: 6 additions & 0 deletions
6
ecmascript/transforms/react/src/jsx/fixture/import-source-pragma/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { jsx as _jsx } from "baz/jsx-runtime"; | ||
|
||
/** @jsxImportSource baz */ | ||
var x = _jsx("div", { | ||
children: _jsx("span", {}) | ||
}); |
1 change: 1 addition & 0 deletions
1
ecmascript/transforms/react/src/jsx/fixture/import-source/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = (<div><span /></div>); |
4 changes: 4 additions & 0 deletions
4
ecmascript/transforms/react/src/jsx/fixture/import-source/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"importSource": "foo", | ||
"runtime": "automatic" | ||
} |
5 changes: 5 additions & 0 deletions
5
ecmascript/transforms/react/src/jsx/fixture/import-source/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { jsx as _jsx } from "foo/jsx-runtime"; | ||
|
||
var x = _jsx("div", { | ||
children: _jsx("span", {}) | ||
}); |
13 changes: 13 additions & 0 deletions
13
.../src/jsx/fixture/nextReact/.should-properly-handle-comments-adjacent-to-children/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var x = ( | ||
<div> | ||
{/* A comment at the beginning */} | ||
{/* A second comment at the beginning */} | ||
<span> | ||
{/* A nested comment */} | ||
</span> | ||
{/* A sandwiched comment */} | ||
<br /> | ||
{/* A comment at the end */} | ||
{/* A second comment at the end */} | ||
</div> | ||
); |
3 changes: 3 additions & 0 deletions
3
.../src/jsx/fixture/nextReact/adds-appropriate-newlines-when-using-spread-attribute/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<Component | ||
{...props} | ||
sound="moo" /> |
5 changes: 5 additions & 0 deletions
5
...rc/jsx/fixture/nextReact/adds-appropriate-newlines-when-using-spread-attribute/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
_jsx(Component, { | ||
...props, | ||
sound: "moo" | ||
}); |
7 changes: 7 additions & 0 deletions
7
ecmascript/transforms/react/src/jsx/fixture/nextReact/arrow-functions/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var foo = function () { | ||
return () => <this />; | ||
}; | ||
|
||
var bar = function () { | ||
return () => <this.foo />; | ||
}; |
13 changes: 13 additions & 0 deletions
13
ecmascript/transforms/react/src/jsx/fixture/nextReact/arrow-functions/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
var foo = function() { | ||
return (function() { | ||
return _jsx(this, { | ||
}); | ||
}).bind(this); | ||
}; | ||
var bar = function() { | ||
return (function() { | ||
return _jsx(this.foo, { | ||
}); | ||
}).bind(this); | ||
}; |
1 change: 1 addition & 0 deletions
1
ecmascript/transforms/react/src/jsx/fixture/nextReact/assignment/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var div = <Component {...props} foo="bar" /> |
5 changes: 5 additions & 0 deletions
5
ecmascript/transforms/react/src/jsx/fixture/nextReact/assignment/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
var div = _jsx(Component, { | ||
...props, | ||
foo: "bar" | ||
}); |
13 changes: 13 additions & 0 deletions
13
...transforms/react/src/jsx/fixture/nextReact/concatenates-adjacent-string-literals/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var x = | ||
<div> | ||
foo | ||
{"bar"} | ||
baz | ||
<div> | ||
buz | ||
bang | ||
</div> | ||
qux | ||
{null} | ||
quack | ||
</div> |
16 changes: 16 additions & 0 deletions
16
...ansforms/react/src/jsx/fixture/nextReact/concatenates-adjacent-string-literals/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
var x = _jsxs("div", { | ||
children: [ | ||
"foo", | ||
"bar", | ||
"baz", | ||
_jsx("div", { | ||
children: [ | ||
"buz bang" | ||
] | ||
}), | ||
"qux", | ||
null, | ||
"quack" | ||
] | ||
}); |
6 changes: 6 additions & 0 deletions
6
...pt/transforms/react/src/jsx/fixture/nextReact/display-name-assignment-expression/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
var Component; | ||
Component = React.createClass({ | ||
render: function render() { | ||
return null; | ||
} | ||
}); |
7 changes: 7 additions & 0 deletions
7
.../transforms/react/src/jsx/fixture/nextReact/display-name-assignment-expression/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var Component; | ||
Component = React.createClass({ | ||
render: function render() { | ||
return null; | ||
}, | ||
displayName: "Component" | ||
}); |
5 changes: 5 additions & 0 deletions
5
ecmascript/transforms/react/src/jsx/fixture/nextReact/display-name-export-default/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export default React.createClass({ | ||
render: function render() { | ||
return null; | ||
} | ||
}); |
6 changes: 6 additions & 0 deletions
6
ecmascript/transforms/react/src/jsx/fixture/nextReact/display-name-export-default/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default React.createClass({ | ||
displayName: "input", | ||
render: function render() { | ||
return null; | ||
} | ||
}); |
13 changes: 13 additions & 0 deletions
13
ecmascript/transforms/react/src/jsx/fixture/nextReact/display-name-if-missing/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var Whateva = React.createClass({ | ||
displayName: "Whatever", | ||
render: function render() { | ||
return null; | ||
} | ||
}); | ||
|
||
var Bar = React.createClass({ | ||
"displayName": "Ba", | ||
render: function render() { | ||
return null; | ||
} | ||
}); |
12 changes: 12 additions & 0 deletions
12
ecmascript/transforms/react/src/jsx/fixture/nextReact/display-name-if-missing/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var Whateva = React.createClass({ | ||
displayName: "Whatever", | ||
render: function render() { | ||
return null; | ||
} | ||
}); | ||
var Bar = React.createClass({ | ||
"displayName": "Ba", | ||
render: function render() { | ||
return null; | ||
} | ||
}); |
7 changes: 7 additions & 0 deletions
7
...cript/transforms/react/src/jsx/fixture/nextReact/display-name-object-declaration/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
exports = { | ||
Component: React.createClass({ | ||
render: function render() { | ||
return null; | ||
} | ||
}) | ||
}; |
8 changes: 8 additions & 0 deletions
8
...ipt/transforms/react/src/jsx/fixture/nextReact/display-name-object-declaration/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
exports = { | ||
Component: React.createClass({ | ||
render: function render() { | ||
return null; | ||
}, | ||
displayName: "Component" | ||
}) | ||
}; |
5 changes: 5 additions & 0 deletions
5
...ript/transforms/react/src/jsx/fixture/nextReact/display-name-property-assignment/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
exports.Component = React.createClass({ | ||
render: function render() { | ||
return null; | ||
} | ||
}); |
6 changes: 6 additions & 0 deletions
6
...pt/transforms/react/src/jsx/fixture/nextReact/display-name-property-assignment/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
exports.Component = React.createClass({ | ||
render: function render() { | ||
return null; | ||
}, | ||
displayName: "Component" | ||
}); |
5 changes: 5 additions & 0 deletions
5
...ipt/transforms/react/src/jsx/fixture/nextReact/display-name-variable-declaration/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var Component = React.createClass({ | ||
render: function render() { | ||
return null; | ||
} | ||
}); |
6 changes: 6 additions & 0 deletions
6
...t/transforms/react/src/jsx/fixture/nextReact/display-name-variable-declaration/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
var Component = React.createClass({ | ||
render: function render() { | ||
return null; | ||
}, | ||
displayName: "Component" | ||
}); |
10 changes: 10 additions & 0 deletions
10
...t/transforms/react/src/jsx/fixture/nextReact/does-not-add-source-self-automatic/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var x = ( | ||
<> | ||
<div> | ||
<div key="1" /> | ||
<div key="2" meow="wolf" /> | ||
<div key="3" /> | ||
<div {...props} key="4" /> | ||
</div> | ||
</> | ||
); |
11 changes: 11 additions & 0 deletions
11
...ransforms/react/src/jsx/fixture/nextReact/does-not-add-source-self-automatic/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"transform-react-jsx", | ||
{ | ||
"autoImport": "namedExports", | ||
"runtime": "automatic" | ||
} | ||
] | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
.../transforms/react/src/jsx/fixture/nextReact/does-not-add-source-self-automatic/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { createElement as _createElement } from "react"; | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { Fragment as _Fragment } from "react/jsx-runtime"; | ||
|
||
var x = /*#__PURE__*/_jsx(_Fragment, { | ||
children: /*#__PURE__*/_jsxs("div", { | ||
children: [/*#__PURE__*/_jsx("div", {}, "1"), /*#__PURE__*/_jsx("div", { | ||
meow: "wolf" | ||
}, "2"), /*#__PURE__*/_jsx("div", {}, "3"), /*#__PURE__*/_createElement("div", { ...props, | ||
key: "4" | ||
})] | ||
}) | ||
}); |
4 changes: 4 additions & 0 deletions
4
...ipt/transforms/react/src/jsx/fixture/nextReact/dont-coerce-expression-containers/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<Text> | ||
To get started, edit index.ios.js!!!{"\n"} | ||
Press Cmd+R to reload | ||
</Text> |
8 changes: 8 additions & 0 deletions
8
...t/transforms/react/src/jsx/fixture/nextReact/dont-coerce-expression-containers/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
_jsxs(Text, { | ||
children: [ | ||
"To get started, edit index.ios.js!!!", | ||
"\n", | ||
"Press Cmd+R to reload" | ||
] | ||
}); |
3 changes: 3 additions & 0 deletions
3
ecmascript/transforms/react/src/jsx/fixture/nextReact/handle-fragments-with-key/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import * as React from "react"; | ||
|
||
var x = <React.Fragment key="foo"></React.Fragment>; |
4 changes: 4 additions & 0 deletions
4
ecmascript/transforms/react/src/jsx/fixture/nextReact/handle-fragments-with-key/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import * as React from "react"; | ||
var x = _jsx(React.Fragment, { | ||
}, "foo"); |
1 change: 1 addition & 0 deletions
1
...ipt/transforms/react/src/jsx/fixture/nextReact/handle-fragments-with-no-children/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = <></>; |
3 changes: 3 additions & 0 deletions
3
...t/transforms/react/src/jsx/fixture/nextReact/handle-fragments-with-no-children/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; | ||
var x = _jsx(_Fragment, { | ||
}); |
1 change: 1 addition & 0 deletions
1
ecmascript/transforms/react/src/jsx/fixture/nextReact/handle-fragments/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = <><div /></> |
7 changes: 7 additions & 0 deletions
7
ecmascript/transforms/react/src/jsx/fixture/nextReact/handle-fragments/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; | ||
var x = _jsx(_Fragment, { | ||
children: [ | ||
_jsx("div", { | ||
}) | ||
] | ||
}); |
5 changes: 5 additions & 0 deletions
5
ecmascript/transforms/react/src/jsx/fixture/nextReact/handle-nonstatic-children/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var x = ( | ||
<div> | ||
{[<span key={'0'} />, <span key={'1'} />]} | ||
</div> | ||
); |
5 changes: 5 additions & 0 deletions
5
ecmascript/transforms/react/src/jsx/fixture/nextReact/handle-nonstatic-children/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
|
||
var x = /*#__PURE__*/_jsx("div", { | ||
children: [/*#__PURE__*/_jsx("span", {}, '0'), /*#__PURE__*/_jsx("span", {}, '1')] | ||
}); |
6 changes: 6 additions & 0 deletions
6
ecmascript/transforms/react/src/jsx/fixture/nextReact/handle-static-children/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
var x = ( | ||
<div> | ||
<span /> | ||
{[<span key={'0'} />, <span key={'1'} />]} | ||
</div> | ||
); |
13 changes: 13 additions & 0 deletions
13
ecmascript/transforms/react/src/jsx/fixture/nextReact/handle-static-children/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
var x = _jsxs("div", { | ||
children: [ | ||
_jsx("span", { | ||
}), | ||
[ | ||
_jsx("span", { | ||
}, "0"), | ||
_jsx("span", { | ||
}, "1") | ||
] | ||
] | ||
}); |
Oops, something went wrong.