If it's a class based component (ES6), it could inherit from the other.
But you could also extract the code logic in a product module, and reuse it in both components, which can even be pure functions.
But you could also extract the code logic in a product module, and reuse it in both components, which can even be pure functions.