Magento 2

How to check in Magento 2.4.4 Customer is logged in or not in phtml

Easy way to check whether customer logged in or not via customer Js component. <div data-bind=”scope: ‘customer'”> <!– ko if: customer().fullname –> Logged In customer