Magento View Model code example
Example: view model in magento 2
<block class="Magento\Framework\View\Element\Template" name="dummy">
<arguments>
<argument name="view_model" xsi:type="object">Yireo\Example\ViewModel\Dummy</argument>
</arguments>
</block>