1.0 Hello World Hello World

The easiest way to get started with React is to use this Hello World example code on CodePen. You don't need to install anything; you can just open it in another tab and follow along as we go through examples. If you'd rather use a local development environment, check out the Installation page.

开始学习React最好的方法是使用我们在CodePen上的Hello World事例。你不需要安装任何东西。你只需要在新的标签页中打开它然后跟着我们给出的事例走。如果你希望使用本地开发环境,那就去看安装说明页。

The smallest React example looks like this:

最小的React事例长成这样:

ReactDOM.render(
    <h1>Hello, world!</h1>,
    document.getElementById('root')
);

It renders a header saying "Hello World" on the page.

它在页面的头部渲染了一个“Hello World”。

The next few sections will gradually introduce you to using React. We will examine the building blocks of React apps: elements and components. Once you master them, you can create complex apps from small reusable pieces.

下面的章节我们将指导你去使用React。我们会查看React应用的构建块:元素和组件。一旦你精通了,你就可以使用重复的小部件创建复杂的应用。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • PLEASE READ THE FOLLOWING APPLE DEVELOPER PROGRAM LICENSE...
    念念不忘的阅读 13,550评论 5 6
  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 9,900评论 0 23
  • 我的自主学习能力是在来到大学之后才逐渐形成的。当然,这也经历了一个过程。 大学之前,一直乖乖的上学,没想过其他,成...
    进攻的尼采阅读 593评论 0 0
  • 我的选择决定了我是谁。 我别无选择,忍让,各方面。退让,各种方式。爱作爱演。演一个没有攻击力的傻子,就是我的生存之...
    Joy君阅读 191评论 2 1
  • 男人每天摸耳朵 会让你更强悍 很多男人在面对中医的治疗在,就是很迷茫的,毕竟发生疾病就是一种很严重的身体情况。耳朵...
    寡人和狗阅读 320评论 0 0