Before we could do something like this:
$_categories = Mage::helper('catalog/category')->getStoreCategories();
foreach($_categories as $_category):
echo $_category->getName();
endforeach;
Plain and simple, just put it in a phtml file to list the categories. In Magento 2 it isn't as simple.
I've tried this, next to scrolling through 4 pages of Google searches for every possible solution ever. None of it works. I figure there is something wrong with my reasoning towards the new CMS. I probably need to see the logic in the structure of this code.
Can anyone please enlighten me on how to list all the stores categories in a phtml file like the example above?