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

Simple types shall not be treated like references

Open pixellos opened this issue 1 year ago • 1 comments

image

Types like:

  • number
  • string
  • null
  • undefined

should not be candidate for Memo, as they're not referencial types.

image (Only colSpan is incorrect in this sample, the style object is highlighted correctly ofc)

Number / string consts should not be treated like error, concatenations as well (if the concatenation parts are stable)

pixellos avatar Oct 27 '23 18:10 pixellos

Also, when we're iterating throu list, and creating elements, if the array is stable, and elements are stable, we should be able to use props without warning

image

pixellos avatar Oct 27 '23 19:10 pixellos