'React prop not working on child component

So I have my parent component with some data:

  const [purchaseData, setpurchaseData] = useState({
    tickets: 0,
    email: "",
    firstName: "",
    lastName: "",
   });

and 2 child components:

 <PurchaseForm purchaseData={purchaseData} />
 <FinalPreview purchaseData={purchaseData} />

but idk why the doesn't take the data. The 1st child component is working perfectly with the purchaseData, but when I try to open the it's just a blank page and doesn't read the data(returns undefined).



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source