DEV Community

Daniel Musembi
Daniel Musembi

Posted on

Adding React to a website.

React can be added to a website without any special tools or installations.

First, we add React library as two script tags to the head of the HTML document.

<script src="https://unpkg.com/react@16/umd
/react.development.js"
cross origin

Next, we need add another script to enable the use of JSX.
JSX is a syntax extension to JavaScript, and it is recommended to be used with React.

<script src="https://unpkg.com/babel-standalone@6/babel.min.js">></script>

After adding the required script tags, we can start building our React app!

We add a container, that will be used to display something using React.

<div id="container"></div>

You can use any *id * for your container. React will use it to find container and add content to it.

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay