how to create view model in magento 2 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>