Skip to content Skip to sidebar Skip to footer

Include React To Existing Web Page - Multiple React Components

I am trying to include React to an web page. i would like to break up the components into it's own .js files. i am not having any luck. My index.html file looks like this.

Solution 1:

I am answering my own question. The order which loads the .js files was the problem. it has to be

<script src="greetings.js" type="text/babel"> </script> 
<script src="app.js" type="text/babel"> </script>

Then it displayed the web page correctly.


Post a Comment for "Include React To Existing Web Page - Multiple React Components"