Related to this question But that solution creating a variable locally doesn't work for me.
My case is:
handleSubmit() {
var posting = $.post(this.props.url, {...});
posting.done(function() {
window.location.href = `/frontend/${this.props.value}`;
});
}
Since the callback function doesn't have access to this, how should I pass this into the callback? If I'm not going to use Ajax.