- Use the props to filter the rows in ProductTable and set the values of the form fields in SearchBar .
- Step 1: Break the UI into a component hierarchy #
- Find a common owner component (a single component above all the components that need the state in the hierarchy).
- If you’re familiar with the concept of state , don’t use state at all to build this static version.
- If you can’t find a component where it makes sense to own the state, create a new component simply for holding the state and add it somewhere in the hierarchy above the common owner component.
Read the full article, click here.
@oskar: “Thinking in @reactjs with a bunch of @jsfiddle examples –”
Thinking in React