JSXSpreadChildren, throw in transform-react-jsx (#4988)
This commit is contained in:
committed by
Henry Zhu
parent
670ee996c8
commit
2bbc36d25e
@@ -35,6 +35,13 @@ export function JSXExpressionContainer(node: Object) {
|
||||
this.token("}");
|
||||
}
|
||||
|
||||
export function JSXSpreadChild(node: Object) {
|
||||
this.token("{");
|
||||
this.token("...");
|
||||
this.print(node.expression, node);
|
||||
this.token("}");
|
||||
}
|
||||
|
||||
export function JSXText(node: Object) {
|
||||
this.token(node.value);
|
||||
}
|
||||
|
||||
1
packages/babel-generator/test/fixtures/types/XJSSpreadChildren/actual.js
vendored
Normal file
1
packages/babel-generator/test/fixtures/types/XJSSpreadChildren/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<div>{...this.props.children}</div>;
|
||||
1
packages/babel-generator/test/fixtures/types/XJSSpreadChildren/expected.js
vendored
Normal file
1
packages/babel-generator/test/fixtures/types/XJSSpreadChildren/expected.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<div>{...this.props.children}</div>;
|
||||
Reference in New Issue
Block a user