The ESLint rule doesn’t allow bind or arrows within props.
Cory House
2

I’m trying to get the eslint rule working but it doesn’t seem to be picking up problems. I have:

“react/jsx-no-bind”: “error”,

in my .eslintrc

and

<FormControl
type=”email”
value={answer}
onChange={(event: SyntheticInputEvent) => {
const newAnswer = event.target.value;
const newAnswers = this.props.answer.slice(0);
newAnswers[index] = newAnswer;
this.props.answerQuestion(this.props.questionKey, newAnswers);
}}
/>

which should throw an error but ESLint passes. Other rules fail correctly.

Show your support

Clapping shows how much you appreciated Jeremy Nagel’s story.