15.1 Props&state PDF
15.1 Props&state PDF
Actually,
only changes in props and/ or state trigger React to re-
render your components and potentially update the DOM in
the browser (a detailed look at how React checks whether
to really touch the real DOM is provided in section 6).
Props
Example:
AllPosts Component:
Post Component:
State
Example:
NewPost Component: