Basic Question:
What is the difference between the types React.ReactElement vs JSX.Element? Are they the same, when should I use each one?
Even though JSX can be used in React to create React elements, React does not require JSX to work, you could replace it with vanilla JavaScript.
React elements are simply defined as a description of what you want to see on the screen. In other words, React elements are the instructions for how the browser DOM should be created.
A ReactElement is an object with a type and props. React reads these objects and uses them to construct the DOM. JSX.Element, on the other hand, is a ReactElement with generic type for props and type being any.