title: Enhance react component with HOC
body: <p>I need to create a reusable Camera component, to do that I want to pass a custom record button and I need to attach to it extra functions or overwrite button text.</p>
  <p>Here an example:</p>
  <p><a href="https://codesandbox.io/s/react-hoc-ksjbf" rel="nofollow noreferrer">https://codesandbox.io/s/react-hoc-ksjbf</a></p>
  <p>I have created a hoc.js that takes custom component and try to overwrite text prop but I have this error:</p>
  <blockquote>
  <p>Element type is invalid: expected a string (for built-in components)
  or a class/function (for composite components) but got: object.</p>
  </blockquote>
  <p>I don't understand was wrong with it, any ideas?</p>