Call method from parent to child via component

Solution 1:

You are facing some syntax issues here. You should destructure your props like this (since the props that you give to your component are stored in an single object):

export default function Jobdetailsmodal({location,method}) { ... }

Note that I named the function that you are passing as method, since it is the name you gave to it here:

 <Jobdetailsmodal location={location} method={loadJobs}/>

You could totally name it loadJobs, but then you have to be consistent, so you use the same name when you pass the prop to the component, and in the component.