Now you can use a new feature of JSX called spread attributes:
var props = {}; props.foo = x; props.bar = y; var component = <Component {...props} />;
The properties of the object that you pass in are copied onto the component's props.
Now you can use a new feature of JSX called spread attributes:
var props = {}; props.foo = x; props.bar = y; var component = <Component {...props} />;
The properties of the object that you pass in are copied onto the component's props.