https://sap.github.io/spartacus-docs/configurable-state-persistence-and-rehydration/
Spartacus offers a mechanism to sync NGRX’s store slices to the specified browser’s storage - localStorage or sessionStorage.
ngrx的存储slice暂时同步到浏览器的storage里去:localStorage或者SessionStorage.
例子:购物车id:
In case there is a need to sync multiple slices of the state, just specify the required properties in storageSync’s keys config and specify the storage type.
需要同步多个state slice的情况如何做?
default-state-config.ts里定义的spartcacus-local-data, 也就是Chrome开发者工具里观察到的数据: