dux:更好的Redux

时间:2021-04-26 23:24:04
【文件属性】:
文件名称:dux:更好的Redux
文件大小:2.79MB
文件格式:ZIP
更新时间:2021-04-26 23:24:04
HTML DUX Dux是一个更简单,更高性能的版本。 它比更易于使用,并且更易于理解和调整。 安装 使用安装 : $ npm install @tpp/dux 在javascript中: const dux = require ( "@tpp/dux" ) 用法 Dux商店具有非常简单的界面: get()获取状态中字段的当前值 每当更新特定字段时,都会调用react() /*** Creation ***/ const store = dux . createStore ( reducer , initialState ) /*** Getting whole state ***/ let currentstate = store . get ( ) /*** Reacting to whole state ***/ store . react ( ( ) => ... . ) /**

网友评论