Best Practice: Class Components or functional component with HOCs?
I am having trouble figuring out if I should be favoring using Class Components or functional components. A small case is when we want to get external API data. We can pull ‘component’ from wp.element and extend our object with the react component class. We can then use lifecycle hooks to fetch the api data. An alternative is we can wrap a simple functional component in a HOC such as ‘withSelect’ and use ‘getEntityRecords’
Is there a best practice? Not just for this particular instance but should we be trying to avoid using react extend and work with Gutenburg’s functions?