eslint-plugin-react-perf
eslint-plugin-react-perf copied to clipboard
add an `allowList` like `nativeAllowList` that allows all custom nodes to have allowed exceptions.
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.
Would love to see something like this! @cvazac is this something you'd consider merging if we submit a PR for it?
@amsul absolutely, it’s a great idea.
This would be useful for RN props also.