eslint-plugin-react: `destructuring-assignment` shouldn't trigger on method calls

The rule react/destructuring-assignment is also triggered when using methods of params.

      formatter: (val) => {
        return <span>{val.toPrecision(2)}</span>;
      },
image

Might also be related to #1950

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 16 (13 by maintainers)

Commits related to this issue

Most upvoted comments

No, since those could still be performing side effects.

Sounds like a hook 😛

Component detection is always a WIP and could always use improvements; PRs are welcome.

I’ll give it a check. Thanks

Even with formatter(val) { it’s still detecting it as a component.

image