jsx-eslint/eslint-plugin-react

New rule to avoid prop value with array or object creation in render

Open

#1,633 opened on Jan 8, 2018

View on GitHub
 (17 comments) (10 reactions) (0 assignees)JavaScript (8,630 stars) (2,797 forks)batch import
acceptedhelp wantednew rule

Description

There is a rule for prop value with function creation (bind, function(...), or arrow function): react/jsx-no-bind But I can't find a rule for array ([]) or object ({}) creation.

It would be useful since it would help to avoid useless renders of pure components.

Contributor guide

New rule to avoid prop value with array or object creation in render · jsx-eslint/eslint-plugin-react#1633 | Good First Issue