Skip to content

[react-perf] Eslint plugin React Perf support #1835

@hariabinesh-l-4219

Description

@hariabinesh-l-4219

Problem Description

https://github.com/cvazac/eslint-plugin-react-perf

Alternative Solutions

No

Feature Details

react-perf/jsx-no-new-object-as-prop: Prevent {...} as JSX prop value
react-perf/jsx-no-new-array-as-prop: Prevent [...] as JSX prop value
react-perf/jsx-no-new-function-as-prop: Prevent function as JSX prop value
react-perf/jsx-no-jsx-as-prop: Prevent JSX as JSX prop value

Examples

const data = {} ;

// warn here
<Comp data={data}></Comp>

Evaluation Checklist

  • I have had problems that this feature would solve
  • I could not find a way to solve the problem with existing features or workarounds
  • I have thought very hard about potential edge cases and downsides, and they are acceptable
  • I think the feature is well-defined and would provide clear value to users

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateDuplicate of existing issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions