建立一个简单的电子商务商店与Nuxt和棱镜。 我的商店里有一个非常简单的动作: async GET_ALL_CATEGORIES({commit}) { // Set categories to the state
} 我的问题是,当我将应用程序从/移动到/category1再到/category1/product1时,我是否应该每次都调度此操作? 可以将这个类别数组保存在localStorage中吗?我应该在我的asyncData中有一个if块来检查categories状态,如果它是空的,就分派操作
</h1> */} {/* <h4>I’m John and I’m a JAMStack engineer!me the problem is */}
<img src={ withPrefix(HeadShotPlaceHolder) } alt="I’m John and I’m a JAMStack