weird issue with `react/jsx-no-bind`
See original GitHub issuethis is my .eslintrc
:
{
"root": true,
"parser": "babel-eslint",
"extends": "airbnb",
"ecmaFeatures": {
"classes": true,
"jsx": true
},
"plugins": [
"react"
],
"rules": {
"react/display-name": 1,
"react/jsx-filename-extension":0,
"react/jsx-no-bind": 2,
"semi": [ 2, "never" ],
"import/no-extraneous-dependencies": 0,
"no-use-before-define": 0,
"no-underscore-dangle": 0,
"import/prefer-default-export": 0,
}
}
For some reason, the rule react/jsx-no-bind
doesn’t work for me while extending airbnb
. If I remove the "extends": "airbnb",
, I get lint errors, but when I extend, lint ignores any setting I might have and doesn’t show errors/warning at all.
Issue Analytics
- State:
- Created 7 years ago
- Comments:13
Top Results From Across the Web
Why shouldn't JSX props use arrow functions or bind?
Using arrow functions or binding in JSX is a bad practice that hurts performance, because the function is recreated on each render. Whenever...
Read more >No bind or arrow functions in in JSX Props - Maarten Mulders
In its ES6 version, the rule says: “No .bind() or Arrow Functions in JSX Props (react/jsx-no-bind).” The TypeScript version has two rules, ...
Read more >Is It Necessary to Apply ESLint jsx-no-bind Rule?
When using ESLint React plugin, you may find a rule called jsx-no-bind. It prevents you from using .bind or arrow function in a...
Read more >Introducing JSX - React
React doesn't require using JSX, but most people find it helpful as a visual aid when working with UI inside the JavaScript code....
Read more >Performance Engineering with React | by Saif Hakim
No amount of prop checking will help, and your component will always re-render. (You can turn on the react/jsx-no-bind eslint rule to disallow...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
"react/jsx-no-bind": [2, {}]
worked for me