relite icon indicating copy to clipboard operation
relite copied to clipboard

support multi arguments

Open pingfengafei opened this issue 8 years ago • 1 comments

  1. 添加webpack命令。 当直接运行webpack失效时,可以用npm run webpack替代
  2. 支持actions多个arguments 以测试为例:
<button onClick={INCREMENT.bind(this, 'aaa', 'bbb', {'hello': 'world'})}>+</button>

原先INCREMENTaction只支持1个参数,这参数用于event事件 现在的代码不支持bind多个参数。 我在分支develop/support-multi-args中尝试支持arguments

pingfengafei avatar Oct 27 '17 04:10 pingfengafei

支持多个参数的意义不大,多个参数可以组织成一个数组或者对象形式。

用例里在 render 方法里 bind(this) 也是一种反模式。

最好保持单参数的简单性。

Lucifier129 avatar Oct 27 '17 05:10 Lucifier129