Skip to content

How to get the base URL in Magento 2 PWA?

I am working with Magento 2 PWA (Progressive Web App) and need to retrieve the base URL in my custom components. I understand that in a regular Magento 2 setup, the base URL can be accessed via the following:

$baseUrl = $this->_storeManager->getStore()->getBaseUrl();

However, since this is a PWA setup, I am unsure how to access the base URL