We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How to pass a parameter to an event handler or callback?
There is another way I think you need to add this as well, It is quite simple and easy to understand.
methodName = (parameter) => () => { //Do something with parameter. console.log("parameter", parameter) }; <button onClick={this.methodName('value you want to pass')} >Click</button>
The text was updated successfully, but these errors were encountered:
Thanks @umair-khanzada. I updated the question with this approach.
Sorry, something went wrong.
No branches or pull requests
How to pass a parameter to an event handler or callback?
There is another way I think you need to add this as well, It is quite simple and easy to understand.
The text was updated successfully, but these errors were encountered: