| Props | State | |
| Owner | parent component | component itself | 
| Accessibility | public, i.e. inside and outside the component | private, only available inside the component | 
| Changeable by parents | yes | no | 
| Changeable by component itself | no | yes | 
| Change mechanism | parent changes prop | component calls this.setState(newState) | 
| Change triggers re-rendering of component | yes | yes | 
 
No comments:
Post a Comment