I need to get customer status in JS component – authenticated or anonymous. Could I get it using Magento_Customer/js/customer-data
and how?
define([
'Magento_Customer/js/customer-data'
], function (customerData) {
let isAnon = customerData.???
});
Best Answer
Yes, use
customerData.get(property)
where property is what you want to get. Example: