When creating React classes in es6 (although in principle I do not know the solution and through the API), you can define defaultProps.
class MyBox extends Component { } myBox.defaultProps = { onEmptyMessage: 'Nothing at here' } Inheriting the MyBox class, we inherit defaultProps.
class MyItems extends MyBox { } But when you try to specify defaultProps for MyItems, the defaultProps of the MyBox class is overwritten.
MyItems.defaultProps = { onRemoveMessage: 'Are you sure?' } After this, onEmptyMessage, property from the senior class, will become unavailable. Of course, you can mix defaultProps directly.
MyItems.defaultProps = _.extend(MyBox.defaultProps, { onRemoveMessage: 'Are you sure?' }); But is there any way to do this in React?
Object.assignalready exists? - D-side