官术网_书友最值得收藏!

Vuex

Vuex provides a powerful way to manage the data of an application as the complexity of the UI increases, by centralizing the application's data into a single store.

We can get snapshots of the application's state by inspecting the store in Vue Devtools:

Figure 1.2. Vue Devtools Vuex tab

The left column tracks changes made to the application data. For example, say the user saves or unsaves an item. You might name this eventtoggleSaved. Vue Devtools lets you see the particulars of this event as it occurs.

We can also revert to any previous state of the data without having to touch the code or reload the page. This function, calledTime Travel Debugging, is something you'll find very useful for debugging complex UIs.

主站蜘蛛池模板: 西乌珠穆沁旗| 肥西县| 夏河县| 呼伦贝尔市| 尖扎县| 鹤壁市| 航空| 仲巴县| 临武县| 和顺县| 武冈市| 黔南| 临湘市| 历史| 化州市| 图片| 亳州市| 墨脱县| 左权县| 洪湖市| 长治市| 贡山| 巴林右旗| 玛纳斯县| 静安区| 南平市| 广水市| 万山特区| 新乐市| 张北县| 惠安县| 抚远县| 萍乡市| 密山市| 三都| 黑山县| 浪卡子县| 曲靖市| 南丹县| 新丰县| 福安市|