DEV Community 👩‍💻👨‍💻

DEV Community 👩‍💻👨‍💻 is a community of 963,274 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in

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)

Thank you.

Thanks for visiting DEV, we’ve worked really hard to cultivate this great community and would love to have you join us. If you’d like to create an account, you can sign up here.