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

1.5 KiB
Raw Blame History

id, title, permalink, next
id title permalink next
why-react-zh-CN 为什么使用 React? why-react-zh-CN.html displaying-data-zh-CN.html

React 是一个 Facebook 和 Instagram 用来创建用户界面的 JavaScript 库。很人多认为 React 是 MVC 中的 V(视图)。

我们创造 React 是为了解决一个问题:构建随着时间数据不断变化的大规模应用程序。为了达到这个目标React 采用下面两个主要的思想。

简单

仅仅只要表达出你的应用程序在任一个时间点应该长的样子然后当底层的数据变了React 会自动处理所有用户界面的更新。

声明式 (Declarative)

数据变化后React 概念上与点击“刷新”按钮类似,但仅会更新变化的部分。

构建可组合的组件

React 都是关于构建可复用的组件。事实上,通过 React 你唯一要做的事情就是构建组件。得益于其良好的封装性组件使代码复用、测试和关注分离separation of concerns更加简单。

给它5分钟的时间

React挑战了很多传统的知识第一眼看上去可能很多想法有点疯狂。当你阅读这篇指南给它5分钟的时间;那些疯狂的想法已经帮助 Facebook 和 Instagram 从里到外创建了上千的组件了。

了解更多

你可以从这篇博客了解更多我们创造 React 的动机。