Files
react.dev/docs/01-why-react.zh-CN.md
Reed Loden dd010b34e2 SSL/TLSize all the things! (convert http:// to https:// where appropriate)
Update links to use https:// where it is supported. There's probably a lot
more that could be fixed, but these are the core ones I found (especially
the download links in order to prevent MITM attacks). Note that there are
some fb.me links that will redirect to http:// even while accessed over
https://, but this seemed like the best way to fix those for now.

NOTE: Only non-third-party files were modified. There are references to
http:// URLs in vendored/third-party files, but seems appropriate to fix
upstream for those rather than editing the files.

Also, copy one image locally to the blog, as it was hotlinking to a site
that did not support https://.

Last, use youtube-nocookie.com instead of youtube.com for video embeds,
as the former doesn't try to set a cookie on load (privacy enhancement).
2015-04-18 16:49:32 -07:00

33 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: why-react-zh-CN
title: 为什么使用 React?
permalink: why-react-zh-CN.html
next: displaying-data-zh-CN.html
---
React 是一个 Facebook 和 Instagram 用来创建用户界面的 JavaScript 库。很人多认为 React 是 **[MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller)** 中的 **V**(视图)。
我们创造 React 是为了解决一个问题:**构建随着时间数据不断变化的大规模应用程序**。为了达到这个目标React 采用下面两个主要的思想。
### 简单
仅仅只要表达出你的应用程序在任一个时间点应该长的样子然后当底层的数据变了React 会自动处理所有用户界面的更新。
### 声明式 (Declarative)
数据变化后React 概念上与点击“刷新”按钮类似,但仅会更新变化的部分。
## 构建可组合的组件
React 都是关于构建可复用的组件。事实上,通过 React 你*唯一*要做的事情就是构建组件。得益于其良好的封装性组件使代码复用、测试和关注分离separation of concerns更加简单。
## 给它5分钟的时间
React挑战了很多传统的知识第一眼看上去可能很多想法有点疯狂。当你阅读这篇指南请[给它5分钟的时间](https://signalvnoise.com/posts/3124-give-it-five-minutes);那些疯狂的想法已经帮助 Facebook 和 Instagram 从里到外创建了上千的组件了。
## 了解更多
你可以从这篇[博客](/react/blog/2013/06/05/why-react.html)了解更多我们创造 React 的动机。