We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
I know that symbol :: is used to call a static method in PHP language.
I see this symbol is used in source code of this react-redux-universal-hot-example like below in "About Us" page: onClick={::this.handleToggleKitten}
Why this should not be onClick={this.handleToggleKitten} without symbol :: ?
Thanks in advance
The text was updated successfully, but these errors were encountered:
this is function bind operator, it does not work like :: in PHP. You can read about it on link below http://babeljs.io/blog/2015/05/14/function-bind/ or https://github.com/zenparsing/es-function-bind It is proposed for ES7 and is currently on stage 0.
{::this.handleToggleKitten} is equivalent of this.handleToggleKitten.bind(this)
It was also removed from source code on this repo with PR #547
Sorry, something went wrong.
Thanks for your kind explanation.
I think that using the arrow function is a better way than using this new symbol :: for this purpose.
No branches or pull requests
I know that symbol :: is used to call a static method in PHP language.
I see this symbol is used in source code of this react-redux-universal-hot-example like below in "About Us" page:
onClick={::this.handleToggleKitten}
Why this should not be onClick={this.handleToggleKitten} without symbol :: ?
Thanks in advance
The text was updated successfully, but these errors were encountered: