![](https://csdnimg.cn/release/download_crawler_static/10977460/bg11.jpg)
Introduction to React 2
Hi, my name is React.
Why should you bother to learn React? In recent years single page applications (SPA³¹) have
become popular. Frameworks like Angular, Ember and Backbone helped JavaScript developers to
build modern web applications beyond the usage of vanilla JavaScript and jQuery. The list of
these popular solutions is not exhaustive. There exists a wide range of SPA frameworks. When
you consider the release dates, most of them are among the first generation of SPAs: Angular 2010,
Backbone 2010 and Ember 2011.
The initial React release was 2013 by Facebook. React is not an SPA framework but a view library. It
is the V in the MVC³² (model view controller). It only enables you to render components as viewable
elements in a browser. Yet the whole ecosystem around React makes it possible to build single page
applications.
But why should you consider using React over the first generation of SPA frameworks? While the
first generation of frameworks tried to solve a lot of things at once, React only helps you to build
your view layer. It’s a library and not a framework. The idea behind it: Your view is a hierarchy of
composable components.
In React you can keep the focus on your view layer before you introduce more aspects to your
application. Every other aspect is another building block for your SPA. These building blocks are
essential to build a mature application. They come with two advantages.
First, you can learn the building blocks step by step. You don’t have to worry about understanding
them altogether. It is different from a framework that gives you every building block from the start.
This book focuses on React as the first building block. More building blocks follow eventually.
Second, all building blocks are interchangeable. It makes the ecosystem around React such an
innovative place. Multiple solutions are competing with each other. You can pick the most appealing
solution for you and your use case.
The first generation of SPA frameworks arrived at an enterprise level. They are more rigid. React
stays innovative and gets adopted by multiple tech thought leader companies like Airbnb, Netflix
and of course Facebook³³. All of them invest in the future of React and are content with React and
the ecosystem itself.
React is probably one of the best choices for building modern web applications nowadays. It only
delivers the view layer, but the React ecosystem is a whole flexible and interchangeable framework³⁴.
React has a slim API, an amazing ecosystem and a great community. You can read about my
experiences why I moved from Angular to React³⁵. I highly recommend to have an understanding
why you would choose React over another framework or library. After all, everyone is keen to
experience where React will lead us in the next years.
³¹https://en.wikipedia.org/wiki/Single-page_application
³²https://en.wikipedia.org/wiki/Model–view–controller
³³https://github.com/facebook/react/wiki/Sites-Using-React
³⁴https://www.robinwieruch.de/essential-react-libraries-framework/
³⁵https://www.robinwieruch.de/reasons-why-i-moved-from-angular-to-react/