ESLint rule for preventing object initialization in React props

Viewed 49

One of the bad React practices is to use object initialization directly in React props, such as double curly braces, and arrow functions:

<Foo bar={{ baz: 1 }} />
<Foo onClick={() => handler()} />

Since they trigger re-render even with memorized props.

Is there any ESLint rule that can prevent these?

0 Answers
Related