Skip to content
PluginStats

eslint-plugin-react-refresh weekly downloads statistics

By ArnaudBarre (2 listings) · npm · ESLint plugins

Validate that your components can safely be updated with Fast Refresh

View on npm Stale · Oct 17, 2026

eslint-plugin-react-refresh has 16,438,745 recorded weekly downloads on npm, a decrease of 50.8% over the past 30 days, ranking #94 of 2,306 tracked listings.

Weekly downloads
16,438,745
Official API · Oct 18, 2026
7-day growth
-50.0%
-16.4M weekly downloads
30-day growth
-50.8%
-17M weekly downloads
90-day growth
-59.1%
-23.8M weekly downloads
Rank
#94
Among tracked npm listings

About eslint-plugin-react-refresh

eslint-plugin-react-refresh npm

Validate that your components can safely be updated with Fast Refresh.

Explainer

"Fast Refresh", also known as "hot reloading", is a feature in many modern bundlers. If you update some React component(s) on disk, then the bundler will know to update only the impacted parts of your page -- without a full page reload.

eslint-plugin-react-refresh enforces that your components are structured in a way that integrations such as react-refresh expect.

Limitations

⚠️ To avoid false positives, by default this plugin is only applied on tsx & jsx files. See Options to run on JS files. ⚠️

The plugin relies on naming conventions (i.e. use PascalCase for components, camelCase for util functions). This is why there are some limitations:

  • export * are not supported and will be reported as an error
  • Anonymous function are not supported (i.e export default function() {})
  • Class components are not supported
  • All-uppercase function export is considered an error when not using direct named export (ex const CMS = () => <></>; export { CMS })

Installation

npm i -D eslint-plugin-react-refresh

Usage

This plugin provides a single rule, react-refresh/only-export-components. There are multiple ways to enable it.

Recommended config
import { defineConfig } from "eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";

export default defineConfig(
  /* Main config */
  reactRefresh.configs.recommended(),
);
Vite config

This enables the allowConstantExport and allowCompoundComponents options which are supported by Vite React plugins.

import { defineConfig } from "eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";

export default defineConfig(
  /* Main config */
  reactRefresh.configs.vite(),
);
Next config

This allows exports like fetchCache and revalidate which are used in Page or Layout components and don't trigger a full page reload.

import { defineConfig } from "eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";

export default defineConfig(
  /* Main config */
  reactRefresh.configs.next(),
);
Without config
import { defineConfig } from "eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";

export default defineConfig({
  // in main config for TSX/JSX source files
  plugins: {
    "react-refresh": reactRefresh.plugin,
  },
  rules: {
    "react-refresh/only-export-components": "error",
  },
});

Examples

These examples are from enabling react-refresh/only-exports-components.

Fail
export const foo = () => {};
export const Bar = () => <></>;
export default function () {}
export default compose()(MainComponent)
export * from "./foo";
const Tab = () => {};
export const tabs = [<Tab />, <Tab />];
const App = () => {};
createRoot(document.getElementById("root")).render(<App />);
Pass
export default function Foo() {
  return <></>;
}
const foo = () => {};
export const Bar = () => <></>;
import { App } from "./App";
createRoot(document.getElementById("root")).render(<App />);

Options

These options are all present on react-refresh/only-exports-components.

interface Options {
  extraHOCs?: string[];
  allowExportNames?: string[];
  allowConstantExport?: boolean;
  allowCompoundComponents?: boolean;
  checkJS?: boolean;
}

const defaultOptions: Options = {
  extraHOCs: [],
  allowExportNames: [],
  allowConstantExport: false,
  allowCompoundComponents: false,
  checkJS: false,
};
extraHOCs <small>(v0.5.0)</small>

If you're exporting components wrapped in non built-in React HOC (memo, forwardRef, lazy), you can use this option to avoid false positives.

{
  "react-refresh/only-export-components": [
    "error",
    { "extraHOCs": ["observer", "withAuth"] }
  ]
}
allowExportNames <small>(v0.4.4)</small>

Default: []

If you use a framework that handles HMR of some specific exports, you can use this option to avoid warning for them.

Example for Remix:

{
  "react-refresh/only-export-components": [
    "error",
    { "allowExportNames": ["meta", "links", "headers", "loader", "action"] }
  ]
}
allowConstantExport <small>(v0.4.0)</small>

Default: false (true in vite config)

Don't warn when a constant (string, number, boolean, templateLiteral) is exported aside one or more components.

This should be enabled if the fast refresh implementation correctly handles this case (HMR when the constant doesn't change, propagate update to importers when the constant changes.). Vite supports it, PR welcome if you notice other integrations works well.

{
  "react-refresh/only-export-components": [
    "error",
    { "allowConstantExport": true }
  ]
}

Enabling this option allows code such as the following:

export const CONSTANT = 3;
export const Foo = () => <></>;
allowCompoundComponents

Default: false (true in vite config)

Don't warn when components are exported as an object gathering them. Every member of the object must be a component, and a member holding an anonymous function requires a component name as key.

This should be enabled if the fast refresh implementation correctly handles this case. Vite supports it since @vitejs/plugin-react 4.7.0, @vitejs/plugin-react-swc 3.11.0.

{
  "react-refresh/only-export-components": [
    "error",
    { "allowCompoundComponents": true }
  ]
}

Enabling this option allows code such as the following:…

Description from the npm listing.

  • eslint
  • eslint-plugin
  • react
  • react-refresh
  • fast refresh

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

eslint-plugin-react-refresh weekly downloads on npm, last 90 days: 19,945,192 weekly downloads as of Oct 18, 2026, -49.4% over 90 days.eslint-plugin-react-refreshWeekly downloads on npm · Last 90 days19,945,192downloads / week-49.4% over 90 days15M20M25M30M35M40M45M50MJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
eslint-plugin-react-refresh weekly downloads on npm, last 90 days: 19,945,192 weekly downloads as of Oct 18, 2026, -49.4% over 90 days.

7/30/90-day growth

eslint-plugin-react-refresh weekly downloads growth on npm: -38.5% over 7 days, -41.3% over 30 days, -49.4% over 90 days.eslint-plugin-react-refreshWeekly downloads growth on npm19,945,192downloads / week now7-day growth-12,491,766 weekly downl…-38.5%30-day growth-14,027,535 weekly downl…-41.3%90-day growth-19,494,219 weekly downl…-49.4%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
eslint-plugin-react-refresh weekly downloads growth on npm: -38.5% over 7 days, -41.3% over 30 days, -49.4% over 90 days.

Ranking history

eslint-plugin-react-refresh npm ranking history: currently #94 (by weekly downloads).eslint-plugin-react-refreshnpm ranking · by weekly downloads · Last 90 days#94current rank#20#30#40#50#60#70#80#90#100Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 17, 2026 – Oct 19, 2026 · 3 observations · Updated Oct 17, 2026pluginstats.com
eslint-plugin-react-refresh npm ranking history: currently #94 (by weekly downloads).

Listing placement

All npm2,256 listings · 113 pages · 1,130 shown · page 5, #14 (overall #94)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins253 listings · 13 pages · page 1, #10 (overall #10)
ESLint plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (544)
Recent weekly downloads observations for eslint-plugin-react-refresh
Date (UTC)Weekly downloadsChange vs. previous
19,945,192+3.5M
16,438,745-4.3M
20,688,837-615.7K
21,304,560-6M
27,276,131-4.4M
31,709,8300
31,709,830-727.1K
32,436,958-436.7K
32,873,677-511.1K
33,384,786-325.4K
33,710,211-1.7M
35,420,641-2.8M
38,237,897-7.3M
45,546,515—

Similar npm ESLint plugins plugins

All 20 eslint-plugin-react-refresh alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/eslint-plugin-react-refresh. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.