In looking at various SPFx tutorials/samples, I've noticed different paradigms demonstrated for where to locate the ReactJS component code. For example, Patrick Rodgers' tutorial on transitioning to @pnp/sp from sp-pnp-js vs a React sp-pnp-js web part included among the SPFx samples. Both achieve a 'Hello World' flavored SharePoint query, but using very different syntax.
Patrick's example houses the pertinent code within the .ts file, and his project does not even appear to have a .tsx file or /components folder at all. José Quinto's sample, on the other hand, utilizes the componentDidMount function within the .tsx file for the pertinent code.
As a newcomer to the SPFx framework, I'd like to know whether one or the other is a preferred 'best practice' - and why. Or is this just a case of personal developer preference?
Thanks! :-)