optimisation.react.inlineElements: move children into props and leave children out if the element has none - @spicyj
This commit is contained in:
@@ -3,9 +3,8 @@
|
||||
({
|
||||
type: Baz,
|
||||
ref: null,
|
||||
children: [],
|
||||
props: babelHelpers.defaultProps(Baz.defaultProps, {
|
||||
foo: "bar"
|
||||
}),
|
||||
key: null
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
({
|
||||
type: Baz,
|
||||
ref: null,
|
||||
children: [],
|
||||
props: babelHelpers.defaultProps(Baz.defaultProps, {}),
|
||||
key: null
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
({
|
||||
type: "foo",
|
||||
ref: null,
|
||||
children: [],
|
||||
props: {
|
||||
bar: "foo"
|
||||
},
|
||||
key: null
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
({
|
||||
type: "foo",
|
||||
ref: null,
|
||||
children: [],
|
||||
props: {},
|
||||
key: null
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
({
|
||||
type: Foo,
|
||||
ref: null,
|
||||
children: [bar, {
|
||||
type: Baz,
|
||||
ref: null,
|
||||
props: babelHelpers.defaultProps(Baz.defaultProps, {}),
|
||||
key: "baz"
|
||||
}],
|
||||
props: babelHelpers.defaultProps(Foo.defaultProps, {
|
||||
children: [bar, {
|
||||
type: Baz,
|
||||
ref: null,
|
||||
props: babelHelpers.defaultProps(Baz.defaultProps, {}),
|
||||
key: "baz"
|
||||
}],
|
||||
className: "foo"
|
||||
}),
|
||||
key: null
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
({
|
||||
type: "div",
|
||||
ref: null,
|
||||
children: [bar],
|
||||
props: {
|
||||
children: [bar],
|
||||
className: "foo"
|
||||
},
|
||||
key: null
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
({
|
||||
type: "div",
|
||||
ref: null,
|
||||
children: [bar, {
|
||||
type: Baz,
|
||||
ref: null,
|
||||
props: babelHelpers.defaultProps(Baz.defaultProps, {}),
|
||||
key: "baz"
|
||||
}],
|
||||
props: {
|
||||
children: [bar, {
|
||||
type: Baz,
|
||||
ref: null,
|
||||
props: babelHelpers.defaultProps(Baz.defaultProps, {}),
|
||||
key: "baz"
|
||||
}],
|
||||
className: "foo"
|
||||
},
|
||||
key: null
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user