-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
In my code if I write ref={arg => this.deleteBtn = arg}, the ESLint will show error;
<button type="button" className="btn btn-xs close" onClick={this.deleteTask} ref={arg => this.deleteBtn = arg} >
The ESLint : Arrow function should not return assignment.(no-return-assign)
So , If that is:
<button type="button" className="btn btn-xs close" onClick={this.deleteTask} ref={(arg) => { this.deleteBtn = arg; }} >
Then the ESLint has no error show