How to get list of all knockout components from the pages in Magento?

You can get a list of all the used knockout components on the current page using uiRegistry.

Knockout Components will be defined using the custom module and Magento native code contains a lot of predefined knockout components like minicart, authentication, customer, etc…

You can also fetch a custom component by its name in the get() method of the uiRegistry object. Continue reading “How to get list of all knockout components from the pages in Magento?”

How statefull property used with knockout JS to keep form data without losing on reload Magento 2?

Magento 2 Keep form data without losing it on reloading the page, One of the useful Magento statefull properties from the UI module is used to save the state in the local storage of the browser.

A statefull object is used to set the state of the property.

You can see statefull: {} defined under the defaults object from the vendor/magento/module-ui/view/base/web/js/lib/core/element/element.js Continue reading “How statefull property used with knockout JS to keep form data without losing on reload Magento 2?”