How to create knockoutJS Observables in magento 2 | Magento 2

Опубликовано: 23 Май 2026
на канале: Know the Mage
1,037
27

Today we will explore how to keep parts of a UI update automatically when related properties are changed. To achieve this we can use those related properties as observables. Observables are special Javascript objects that can notify subscribers about changes, and can automatically detect dependencies.


Related videos:
👉 Create a simple knockout js Component in Magento 2:    • How to use Knockout in a simple component ...  
👉 Working with KockoutJS bindings in Magento 2:    • Working with KockoutJS bindings in Magento...  
👉 How to pass dynamic variables to a component in Magento 2 - Knockout JS:    • How to pass dynamic variables to a compone...  


Chapters:
0:00 Start
0:05 Overview
0:16 Created a simple component
1:47 Reading observable properties
2:37 Writing multiple observable properties
3:27 Update observable value dynamically
5:04 Subscribing to observables
7:59 Always notify subscribers
9:58 Delaying change notifications
12:21 Using observable between components