How to pass function that returns value to prop of component?

I am trying to pass a function that returns true or false based on a parameter and the prop takes a bool. It is not working. Thank you for your help.

  const myfunction = (input) => {
    if (input == 0)
       {
          return true
        }
         else if (input == 1)
        {
         return false

         }
       }
    


<Component myprop={()=>{myfunction(input)}} />