Summary
In this chapter, we have seen how industry practices such as the Model View Controller architecture and application state allow us to think of data in a React application. These are represented in React using state and props.
First, we looked at how state can be initialized and used and how mutating it allows us to make our applications dynamic. We saw how we can write and use custom methods to manipulate state and how this allows us to create applications with complex logic.
We also went through props in React, which, coupled with callback functions, can be used to achieve a unidirectional data flow.
We covered examples that included a complex application with multiple components and used props and state for unidirectional data flow from one component to another.
With this understanding of state and props in React, we can build applications with complex data flows and start to delve further into complex concepts in React. In the next chapter, we will discuss how...