React - Getting Started: Script References

Adding is script references to your website is a common way to quickly integrate React. Add the following to any page to get started with React.


<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin=""></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin=""></script>

You'll notice the necessity to change the development references to production before deployment. If you're using MVC as the underlying framework for your site you can do the following:

	
		<environment names="Development">
<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin=""></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin=""></script>
</environment> <environment names="Staging,Production">
<script src="https://unpkg.com/react@16/umd/react.production.js" crossorigin=""></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.js" crossorigin=""></script>
</environment>