A quick google search shows that the question I have has not been asked directly, and so I ask it here. For what its worth, I am learning react, and I come from a C++ background, where as far as I know, "functional components" are not a thing.
Taking from a tutorial, this seems to be a barebone example of a functional component
import React from 'react';
function App()
{
const greeting = 'Hello Function Component!';
return <h1>{greeting}</h1>;
}
export default App;
It just looks like a function to me, and yet in react, it is referred to as a functional component.
- Why is the terminology, "functional component" used?
- Why not "Component Function"?
- If I simply called this a function, would react developers be confused?
Thanks.