Why would I use React.createElement() instead of JSX?

Question

Why would I use React.createElement() instead of JSX?

Answer

We would use React.createElement() instead of JSX when we do not want to set up compilation for our project, which the use of JSX requires!

9 Likes

There is a minor typo in the Answer section. There is a misplaced I in React.createElementI().

I have been enjoying your React Q&A posts. Thank you.

5 Likes

I hope that the compilation/setup for the project is covered.