Both seem to result in no compilation errors, but what\'s the difference and is one preferable to the other?
This exact question was asked over in the react-typescript-cheatsheet repo issue #57
To quote the original answer:
Regardless of what a component ends up rendering,
React.createElementalways returns an object, which is theJSX.Elementinterface, butReact.ReactNodeis the set of all possible return values of a component.
JSX.Element-> Return value ofReact.createElementReact.ReactNode-> Return value of a component
Generally, I think the idea is that JSX.Element specifically describes the interface of React.createElement and is narrow in scope whereas React.ReactNode is more broad and covers all possible values that a Component could return.