I've always done the following to bind this of a function in a React component
this.updateInput = this.updateInput.bind(this);
but I've been seeing more and more of the arrow method outside the constructor like so
updateInput = () => ( code here )
but when I try this in my code it throws a syntax error. Why?