Back to course

Lifting State Up

React JS 0 to Hero: The Complete Guide

Lifting State Up

If two components need to share the same state, move it to their closest common ancestor and pass it down via props.