Adding React to a WordPress Theme Tutorial

Ever since WordPress 5.0, React (or an abstraction of it), now ships with WordPress.
Normally, with a React app or project, you import React at the top of each file that uses React.
In WordPress we do not import React or React DOM because they are made available in the global wp.element object.
Another difference between using React normally and in a WordPress theme or plugin has to do with tooling.

Leave a Reply


Sign up for our newsletter to stay updated.


Curated WordPress Resources