Answer the question
In order to leave comments, you need to log in
NodeJS React and WP how to compile a project into 1 JS file?
Explain to an amateur, let's say I have a page on wordpess in the body of which there is some <div id="container">
how I can configure react in such a way that it is assembled into a js file that I simply connect to the desired page, and it works and renders what I need in the container.
Answer the question
In order to leave comments, you need to log in
You can include React like a regular js script.
<script src="https://unpkg.com/[email protected]/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/[email protected]/umd/react-dom.development.js" crossorigin></script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question