gfs-react-dm
Version:
简化react和redux的繁杂流程,更简单的数据操作管理
26 lines (24 loc) • 761 B
JavaScript
;
exports.__esModule = true;
exports.binding = binding;
function binding(path, transValueFunc) {
//binding
/*var _this = this
var dispatch = window['dispatch']||this.state.dispatch || this.props.dispatch
//可能会操作多个不同的store user,index,list...
let reducerPathArray = path.split('.')
//拿最后一个[user,index,list] = 'list'
let reducerName = reducerPathArray[0]
let store = this.props[reducerName]
//book.name
let value = store.getIn(readPath)
if (transValueFunc) {
value = transValueFunc(value)
}
return {
value: value,
requestChange: function (newValue) {
_this.props.update && _this.props.update(path,newValue)
}
}*/
}