Vuex是一個專門為vue專案開發的資料管理套件,可以為網站做全域的資料管理
Components 透過
State
內的資料render出畫面
資料需要變動時,透過Actions commit一個Mutation
Mutation 變更 State中的資料
Components 重新render變化後的結果
Does Nuxt 3 support Vuex?
Nuxt3 + Pinia實戰教學
Pinia