npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-plugin-react-native-performance

v0.1.0

Published

ESLint rules for React Native list virtualisation and render performance problems

Readme

eslint-plugin-react-native-performance

ESLint rules for React Native list virtualisation and render performance problems.

CI npm downloads license

Why this exists

Most React Native performance problems need a profiler. A few do not, and those are worth catching in the editor.

This plugin covers the list virtualisation ones: nesting a FlatList inside a ScrollView, rendering a growing collection with .map(), keying rows by array index, and passing new function references to a list on every render. All of these are statically detectable and all of them defeat the windowing that FlatList exists to provide.

Install

npm install --save-dev eslint-plugin-react-native-performance

Requires ESLint 8.40 or later and Node 18 or later.

Usage

Flat config (ESLint 9)

// eslint.config.js
import rnPerf from 'eslint-plugin-react-native-performance'

export default [rnPerf.configs.recommended]

Or wire rules individually:

import rnPerf from 'eslint-plugin-react-native-performance'

export default [
  {
    plugins: { 'rn-perf': rnPerf },
    rules: {
      'rn-perf/no-nested-virtualized-list': 'error',
      'rn-perf/no-index-key-extractor': 'error',
    },
  },
]

Legacy config (.eslintrc)

{
  "plugins": ["rn-perf"],
  "extends": ["plugin:rn-perf/legacy-recommended"]
}

Rules

| Rule | What it catches | | --- | --- | | no-nested-virtualized-list | FlatList inside a ScrollView of the same orientation | | no-scrollview-list | Rendering a collection with .map() inside a ScrollView | | require-key-extractor | Virtualized lists with no keyExtractor | | no-index-key-extractor | keyExtractor returning the array index | | no-inline-list-props | Inline renderItem and component props on lists |

Rules apply to FlatList, SectionList, VirtualizedList and FlashList.

What this plugin does not do

It does not measure anything. These are static rules. They cannot tell you whether a screen is actually slow, how many times a component re-rendered, or what your frame timings look like. Use the React DevTools profiler, Flipper or Hermes sampling for that.

It deliberately overlaps very little with what already exists. eslint-plugin-react-native covers no-inline-styles and no-unused-styles. eslint-plugin-react covers jsx-no-bind and no-array-index-key generically. This plugin covers the list-specific cases those miss, in particular no-index-key-extractor, which react/no-array-index-key does not catch because the index is returned from a function rather than assigned to a key prop.

Some rules are judgement calls, not defects. no-scrollview-list is a suggestion: a .map() over five static items in a ScrollView is fine, which is why allowStaticArrays defaults to true. Disable rules per line where you have measured and are satisfied.

Contributing

Issues and pull requests welcome, particularly false positives with a reproduction.

npm test

License

MIT