update parent component from child component react hooks