I want to pass the value written in input field to app component and show it in h1 tag

You can refer to this sandbox I have attached. I have already tried passing function as prop but it doesn't help.

 [view CodeSandbox](https://codesandbox.io/s/red-field-n4981?file=/src/App.js)

Also, I really struggle and get confused when to pass value or when to pass function can someone explain me that as well.