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.

7 Likes

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

1 Like

Why it need to add letter I?

There was a typo in the answer by aubsrey, fieryneuron was so kind to inform us about it. The I was the typo :wink:

1 Like