freeCodeCamp/guide/chinese/react/a-react-environment-using-a.../index.md

13 lines
600 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: A React Environment Using a Remote Code Repository
localeTitle: 使用远程代码存储库的React环境
---
这是如何使用远程代码存储库创建非生产React环境。 我们将使用cdnjs.cloudflare.com 16.0.0 reactreact-dom和babel-standalone 6.26.0 实现这一目标。 babel-polyfill用于较旧的浏览器兼容性。
\`\`\`HTML
你好React
ReactDOM.render( <h1>Hello React</h1>, document.getElementById('helloreact'));
\`\`\` 如果此代码与html文件扩展名helloReact.html一起保存则可以在Web浏览器中打开 它将运行React和Babel。