Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

readme.md

Chapter 6 : Props state and the component tree

Data handling within component trees is one of the key advantages of working with React. There are techniques that you can use when working with data in React components that will make your life much easier in the long run.

Samples

Property Validation and default Props

  • Validation with React.createClass (1, 2, 3, 4, 5, 6)
  • default properties with React.createClass (1)
  • customValidation (1)
  • Properties with ES6 classes (1)
  • Properties with Stateless Functional Components (2, 3)
  • ES7 static properties (4)

Refs

  • Color Component with Refs (1, 2)
  • Two-way Data Binding (3, 4)
  • Default Function Properties (5, 6, 7)
  • Refs In Stateless Functional Components (8, 9)

Component State

  • The Star Component (1)
  • Using State with createClass (1)
  • Using State in ES6 Components (2)
  • Setting State from Properties (3, 4)

State within the Component Tree