美文网首页
安装 redux

安装 redux

作者: 海货 | 来源:发表于2018-08-12 09:12 被阅读0次

P1

npm i --save @ngrx/core@1.2.0 @ngrx/store@2.2.3 @ngrx/router-store@1.2.6 @ngrx/effects@2.0.4 @ngrx/store-devtools@3.2.4

P2

storeFreeze 用于防止 state 被修改,在 Redux 中我们必须确保 state 是不可更改的,这个函数有助于帮我们检测 state 是否被有意或无意的修改了。当 state 发生修改时,会抛出一个异常,这一点在开发时非常有帮助。根据环境变量的值,发布时会不包含这个函数。

npm i --save @ngrx-store-freeze@0.1.9

相关文章

网友评论

      本文标题:安装 redux

      本文链接:https://www.haomeiwen.com/subject/yszjbftx.html