Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support multi arguments #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pingfengafei
Copy link

  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

@Lucifier129
Copy link
Owner

Lucifier129 commented Oct 27, 2017

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

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants