eslint-plugin-react-perf icon indicating copy to clipboard operation
eslint-plugin-react-perf copied to clipboard

add an `allowList` like `nativeAllowList` that allows all custom nodes to have allowed exceptions.

Open clord opened this issue 4 years ago • 3 comments

emotion allows css={[aRules, bRules]} and does the right thing for re-rendering, so it should not be flagged as a performance issue. We can turn this off for native elements like div, but css is allowed on any element, including custom elements.

There are other examples like this, for example, I can accept style on a custom element and pass it unchanged to the native one, and so would make sense to allow style as an exception on custom elements too.

clord avatar Dec 16 '20 18:12 clord

Would love to see something like this! @cvazac is this something you'd consider merging if we submit a PR for it?

amsul avatar Jan 29 '21 21:01 amsul

@amsul absolutely, it’s a great idea.

cvazac avatar Jan 30 '21 04:01 cvazac

This would be useful for RN props also.

milesj avatar Jun 29 '21 22:06 milesj