Currently the customer object is defined as:
const { customer, loading } = useMantle();
However, the customer can be nullable when the customer is loading. This can lead to cannot read properties of null errors when attempting to grab data off of the customer. I think that it would be better if the type reflects this.
* @property {Customer|null} customer - The current customer
https://github.com/Hey-Mantle/react/blob/master/src/components/core/MantleProvider/MantleProvider.js#L225
Happy to open PR but I didn't see a contributing doc.
Anyways, great work Mantle team. I'm loving the product 🤝
Currently the
customerobject is defined as:However, the customer can be nullable when the customer is loading. This can lead to
cannot read properties of nullerrors when attempting to grab data off of the customer. I think that it would be better if the type reflects this.https://github.com/Hey-Mantle/react/blob/master/src/components/core/MantleProvider/MantleProvider.js#L225
Happy to open PR but I didn't see a contributing doc.
Anyways, great work Mantle team. I'm loving the product 🤝