React.createElement takes all the arguments passed after the 2nd one and considers them children.
To avoid this issue, always return () and write the JSX elements inside the parentheses.
By opening the (), no semi-colon will be automatically inserted after return until the closing parenthesis is found, and you avoid unexpected issues.
JSX supports children Always wrap your JSX elements with () when written after a return.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.