← React Beginner Questions - Set 10 Q95

How do you pass data between sibling components in React?

React Beginner Questions - Set 10

Example

function Parent() {
  const [q, setQ] = useState('');
  return <><Input value={q} onChange={setQ} /><Results query={q} /></>;
}

What to notice

← Back to the question list