If you don't want to use npm to manage client packages, the react and react-dom npm packages also provide single-file distributions in dist folders, which are hosted on a CDN:
如果你不想使用npm去管理客户端的包,react和react-dom的npm包同样提供一个单独文件,它们发布到了CDN的dist文件夹里。
<script src="https://unpkg.com/react@15/dist/react.js"></script>
<script src="https://unpkg.com/react-dom@15/dist/react-dom.js"></script>
The versions above are only meant for development, and are not suitable for production.
以上版本仅用于开发,不适合生产。
Minified and optimized production versions of React are available at:
压缩和优化过得生产版本的React可以在:
<script src="https://unpkg.com/react@15/dist/react.min.js"></script>
<script src="https://unpkg.com/react@15/dist/react-dom.min.js"></script>
To load a specific version of react and react-dom, replace 15 with the version number.
替换版本号15可以加载一个特定的React和React-dom版本。
If you use Bower, React is available via the react package.
如果你使用浏览器,React可通过react包获得。
网友评论