Practice
When we spread props, we risk adding unknown HTML attributes, which is bad practice. Instead we can destructure the props with the
const ComponentA = () => < ComponentB isDisplay = { true } className = { ' componentStyle ' } />
const ComponentB = ({ isDisplay , ... domProps }) => < div { ... domProps } > { ' ComponentB ' } </ div >
Comments