詳細說明 - Blog 連結
- 前端如何做到數據綁定
- 訂閱/發佈模式
- MVVM
- Proxy vs defineProperty
- 響應式, 數據驅動畫面。
<div>{{ text }}</div>
<script>
const data = { text: 'init' }
// expect auto re-render UI on update
data.text = 'Hello'
</script>
./study/
跟著網路文章實作的內容index.html
與view-model.esm.js
為個人消化, 精簡後的實作