How to pass value from third Component to Home.js in react?

I am new to react so hope this doesn’t sound like a stupid question.

I have a scenario where I have a Home.js with the component that creates a from and a to date range that is then passed to the apiPost.js that retrieves data in that date range.

My problem is getting the values to the Home.js from the apiPost.js after the values have been retrieved.

I should probably note I am not using classes.

I have tried this in the Home.js but it just returns Undefined in let val

(async function () {
      try {
        console.log("fetching data.....");
        let val = await GetValues().then(result => console.log('Home2 ', result));
        console.log("Home", val);
        //console.log("Total is ", val.Total);
        setValue(val);
        console.log('Home state is ',value)
        console.log("Successs: fetching data rendered");
      } catch (err) {
        console.error(err.message);
      }
    })();

Thank you in advance.