上QQ阅读APP看书,第一时间看更新
Chapter 3. Understanding Properties and State
React components rely on JSX syntax, which is used to describe the structure of the UI. JSX will only get us so far—we need data to fill in the structure of our React components. The focus of this chapter is component data, which comes in two varieties: properties and state.
We'll start things off by defining what is meant by properties and state. Then, we'll walk through some examples that show you the mechanics of setting component state, and passing component properties. Toward the end of this chapter, we'll build on your new-found knowledge of props and state and introduce functional components and the container pattern.