QuackatronHQ / Gigarepo

Avoid .bind() or local functions in JSX properties JS-0417
Performance
Major
a month ago2 years old
JSX props should not use arrow functions
 7      <h1
 8        class="no-unknown-property"
 9        font-size="24"
10        onClick={() => console.log("Should not use bind in JSX props")}11      >
12        {title || "Welcome to DeepSource"}
13      </h1>
JSX props should not use arrow functions
 7      <h1
 8        class="no-unknown-property"
 9        font-size="24"
10        onClick={() => console.log("Should not use bind in JSX props")}11      >
12        {title || "Welcome to DeepSource"}
13      </h1>
JSX props should not use arrow functions
 8
 9  render() {
10    <div
11      onClick={() => this.handleClick.bind(this)}12      class={this.props.class_name}
13    >
14      {this.props.title}
JSX props should not use arrow functions
 8
 9  render() {
10    <div
11      onClick={() => this.handleClick.bind(this)}12      class={this.props.class_name}
13    >
14      Welcome to {this.props.title} TestingComponent Component