title: React - Get the component name in functional components
body: <p>I want on every component in my app to add attribute component-name="componentX". I don't want to do it hard coded when creating a component but to find a generic way to find the component name and set it in the attribute.</p>
  
  <p>I know there is the displayName property but it's only for class component.</p>
  
  <p>I have a lot of functional components. How can I achieve it?</p>
  
  <p>Thanks!</p>