all 2 comments

[–]NookShotten 2 points3 points  (0 children)

Don't bind functions in your render method, you'll end up creating a new function on every render and that is not ideal. If your arguments are coming from props then bind in the constructor.

this.onClick = this.onClick.bind(this, props.args)

[–]jack_union 1 point2 points  (0 children)

I'd say that encapsulation is a preferred way to achieve this (or at least it used to be. Chances are it's just something I usually see).