In parent:
const youNameOfCallback = (array) => {
setTessState(array)
}
<ChildComponent youNameOfCallback={youNameOfCallback} />
In child:
useEffect(() => {
props.youNameOfCallback(YouArrayFromChild)
}, [])
This will be apply when child will be mounted.
CLICK HERE to find out more related problems solutions.