I don't quite understand your question but there doesn't seem to be any error in your code.The data variable is updated once you click on the button and you can display it like
console.log(`Parent rendering ..${data}`);
See updated value