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

Auto bind event handler option #109

Closed
airtoxin opened this issue Mar 7, 2016 · 2 comments
Closed

Auto bind event handler option #109

airtoxin opened this issue Mar 7, 2016 · 2 comments

Comments

@airtoxin
Copy link

airtoxin commented Mar 7, 2016

I got those error many times... RTCodeError: when using 'on' events, use lambda '(p1,p2)=>body' notation or use {} to return a callback function. error: [onClick='this.onClick']

Is there any option of auto bind event handler function?

@nippur72
Copy link
Contributor

nippur72 commented Mar 7, 2016

that would be a nice feature to have.

I've solved this with a post-processing tool of my own that binds to this if the on-event attribute starts with this.

nippur72 added a commit to nippur72/react-templates that referenced this issue May 17, 2016
@nippur72
Copy link
Contributor

here is an article that describes how people currently handle binding (out of react-templates): react-binding-patterns-5-approaches-for-handling-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

No branches or pull requests

2 participants