1
ReactIntermediate#patterns#context
Moving shared state to the closest common ancestor of the components that need it, then passing the value down as props and changes back up through callbacks, so both stay in sync.
function Parent() {
const [q, setQ] = useState('');
return <><Search value={q} onChange={setQ} /><Results q={q} /></>;
}