📜  https:reactjs.org 文档 cdn-links.html (1)

📅  最后修改于: 2023-12-03 15:31:20.620000             🧑  作者: Mango

ReactJS CDN Links

ReactJS is a JavaScript library for building user interfaces. It is maintained and developed by Facebook. ReactJS allows developers to build reusable UI components and manage component state effectively.

To get started with ReactJS, you need to include the library in your projects. There are two ways to include ReactJS in your projects:

  1. Install ReactJS using NPM and import it into your JavaScript files.
  2. Include ReactJS using a CDN (Content Delivery Network).

In this document, we will discuss the second way of including ReactJS in your projects, using a CDN.

Benefits of using a CDN for ReactJS

Using a CDN to include ReactJS in your projects has several benefits:

  • Faster load times: CDNs are geographically distributed, so the library will be loaded from the closest server, reducing load times.
  • No installation required: You don't need to install ReactJS on your system or your server. Simply include the library using a CDN link.
  • Improved caching: CDNs use caching to store the library files on user's machines, reducing the need to fetch the files from the server each time the page is loaded.
CDN links for ReactJS

Here are some popular CDN links for including ReactJS in your projects:

ReactJS
<!-- ReactJS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.1/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.1/umd/react-dom.production.min.js"></script>
ReactJS with JSX support
<!-- ReactJS with JSX support -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.1/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.1/umd/react-dom.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script>
ReactJS with Redux
<!-- ReactJS with Redux -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.1/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.1/umd/react-dom.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/4.0.5/redux.min.js"></script>
Conclusion

Using a CDN to include ReactJS in your projects is a quick and easy way to get started with the library. Choose a CDN link that meets your project's requirements and include it in your HTML files. Happy coding!