How can I set the data on this component when inside a parent component?

I have this child component that will end up in a parent component. I need to update the state or send data to the child one a function finishes in the parent ( a button in the parent is pushed.)

const SenViewer = (data) => {
  const [sen, setSen] = useState({
    sens: [],

  this.setSen({ sens: data });
  return (
      { => (
        <Card className='text-center'>
            Ticket: <p>Sen </p>
              <p>Entire Audio</p>
          <Card.Footer className='text-muted'>
            <Button variant='primary'>TODO: smiley if good total</Button>
}; // end of component

Here is the render for the parent.

   <SenViewer />


In you parent component create a state, which will hold the data you want to send.

const Parent = () => {
  const [data,setData] = React.useState({});

   React.useEffect(()=> {
  return <div>
           <SenViewer data={data} />

In Child Component, use it like this

const SanViewer = (props)=> {
  console.log( // received data from parent

Read more about props here