Answer the question
In order to leave comments, you need to log in
How to pass data from child component to parent?
There is a Parent
component :
function Parent() {
const [state, setState] = useState([])
return (
<Buttons />
)
}
function Buttons() {
return (
<Button>1</Button>
<Button>2</Button>
)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question