Principles of React
React also comes loaded with principles. It follows three major principles, as follows:
- Declarative: As mentioned in the earlier chapters, React is declarative in nature. Declarative programming means that the developer creates the code of what you want to do, without thinking about how to do it.
- Component-based: An application can be broken down into several modules that communicate with one another to construct complex, interactive user interfaces.
- Learn once, write anywhere: This enforces reusability. A component written once can be used in multiple views, and can even be exported to be used in a separate application.