react框架简介_React简介

react框架简介

什么是React? (What is React?)

React is a JavaScript library that aims to simplify development of visual interfaces.

React是一个JavaScript库,旨在简化可视界面的开发。

Developed at Facebook and released to the world in 2013, it drives some of the most widely used apps, powering Facebook and Instagram among countless other applications.

它是在Facebook上开发并于2013年发布的,它驱动了一些使用最广泛的应用程序,为Facebook和Instagram提供了无数其他应用程序。

Its primary goal is to make it easy to reason about an interface and its state at any point in time, by dividing the UI into a collection of components.

它的主要目标是通过将UI划分为组件集合,从而在任何时间点都可以轻松地推断出接口及其状态。

React has taken the frontend web development world by storm. Why?

React已经席卷了前端Web开发领域。 为什么?

不太复杂 (Less complex than the other alternatives)

At the time when React was announced, Ember.js and Angular 1.x were the predominant choices as a framework. Both these imposed so many conventions on the code that porting an existing app was not convenient at all. React made a choice to be very easy to integrate into an existing project, because that’s how they had to do it at Facebook in order to introduce it to the existing codebase. Also, those 2 frameworks brought too much to the table, while React only chose to implement the View layer instead of the full MVC stack.

在发布React的时候,Ember.js和Angular 1.x是框架的主要选择。 两者都对代码施加了太多约定,以至于移植现有应用程序根本不方便。 React选择了一个非常容易集成到现有项目中的选择,因为这是他们必须在Facebook上进行的操作,以便将其引入现有代码库。 另外,这两个框架给表带来了太多的麻烦,而React只选择实现视图层而不是完整的MVC堆栈。

时间恰好 (Perfect timing)

At the time, Angular 2.x was announced by Google, along with the backwards incompatibility and major changes it was going to bring. Moving from Angular 1 to 2 was like moving to a different framework, so this, along with execution speed improvements that React promised, made it something developers were eager to try.

当时,谷歌宣布了Angular 2.x,以及向后的不兼容和即将带来的重大变化。 从Angular 1迁移到2就像迁移到其他框架一样,因此,这以及React承诺的执行速度的提高,使开发人员渴望尝试一下。

由Facebook支持 (Backed by Facebook)

Being backed by Facebook obviously is going to benefit a project if it turns out to be successful.

如果事实证明,获得Facebook的支持显然将使​​一个项目受益。

Facebook currently has a strong interest in React, sees the value of it being Open Source, and this is a huge plus for all the developers using it in their own projects.

Facebook当前对React具有浓厚的兴趣,并认为它具有开源的价值,这对于所有在自己的项目中使用它的开发人员来说都是一个巨大的优势。

React很容易学习吗? (Is React simple to learn?)

Even though I said that React is simpler than alternative frameworks, diving into React is still complicated, but mostly because of the corollary technologies that can be integrated with React, like Redux and GraphQL.

尽管我说过React比其他框架要简单,但是进入React仍然很复杂,但这主要是因为可以与React集成的推论技术,例如ReduxGraphQL

React in itself has a very small API, and you basically need to understand 4 concepts to get started:

React本身具有非常小的API,您基本上需要了解4个概念才能入门:

翻译自: https://flaviocopes.com/react-introduction/

react框架简介

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值