In some reaction libraries, I see some syntax as shown below. What does this mean and how can I help in my codes?
const inputAttributes = { id: 'events-playground', placeholder: 'Where are you now?', onChange: ::this.onInputChanged, onBlur: ::this.onInputBlurred };
Thanks.
This is the new ES7 syntax for .bind ,
equivalent in ES5
const inputAttributes = { id: 'events-playground', placeholder: 'Where are you now?', onChange: this.onInputChanged.bind(this), onBlur: this.onInputBlurred.bind(this) };