
上QQ阅读APP看书,第一时间看更新
The principles of React
Similarly to Redux, React also comes with a set of principles, as follows:
Declarative: This means you write code of what you want and do not have to think about how to do it.
Component-based: You can split your application into multiple modules and combine them to build complex user interfaces.
Learn once, write anywhere: React is a library, not a framework. It is independent of your stack and you can use it in the browser, on the server, or even on mobile apps (using React Native).
These principles might remind you a bit of Redux—the reason for that is Redux being heavily inspired by React, and both libraries are inspired by functional programming principles.