This basically helps to add/edit props passed to the Component.
function HOC(WrappedComponent) { return class Test extends Component { render() { const newProps = { title: 'New Header', footer: false, showFeatureX: false, showFeatureY: true }; return <WrappedComponent {...this.props} {...newProps} /> } } }
Last updated 4 years ago
Was this helpful?