change a parent’s state using child arrow functions react

In parent:

const youNameOfCallback = (array) => {

<ChildComponent youNameOfCallback={youNameOfCallback} />

In child:

useEffect(() => {
}, [])

This will be apply when child will be mounted.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top