链接:https://sap.github.io/spartacus-docs/loader-meta-reducer/#creating-actions
To give better feedback to users, based on their actions, we often have to keep information such as “cart is loading”, “fetching user address failed”, and so on.
为了给用户提供更好的用户体验,基于其在Spartacus上进行的动作,我们需要track诸如“Cart正在加载”,“读取用户地址信息失败”等信息。
For every separate application state, we have to keep that meta data beside. Separate for cart, user information, product data and so on. Implementing this logic in all of these places manually would result in having different solutions to the same problem across the codebase.
That’s why in spartacus loaderReducer was created.