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 Fresh · Dec 6, 2026

eslint-plugin-react-refresh has 29,774,050 recorded weekly downloads on npm, a decrease of 2.2% over the past 30 days, ranking #112 of 3,247 tracked listings.

Weekly downloads
29,774,050
Official API · Dec 5, 2026
7-day growth
+5.4%
+1.5M weekly downloads
30-day growth
-2.2%
-656.4K weekly downloads
90-day growth
-4.8%
-1.5M weekly downloads
Rank
#112
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: 29,774,050 weekly downloads as of Dec 5, 2026, -4.8% over 90 days.eslint-plugin-react-refreshWeekly downloads on npm · Last 90 days29,774,050downloads / week-4.8% over 90 days010M20M30M40M50MSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
eslint-plugin-react-refresh weekly downloads on npm, last 90 days: 29,774,050 weekly downloads as of Dec 5, 2026, -4.8% over 90 days.

7/30/90-day growth

eslint-plugin-react-refresh weekly downloads growth on npm: +5.4% over 7 days, -2.2% over 30 days, -4.8% over 90 days.eslint-plugin-react-refreshWeekly downloads growth on npm29,774,050downloads / week now7-day growth+1,524,815 weekly downlo…+5.4%30-day growth-656,425 weekly downloads-2.2%90-day growth-1,502,671 weekly downlo…-4.8%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
eslint-plugin-react-refresh weekly downloads growth on npm: +5.4% over 7 days, -2.2% over 30 days, -4.8% over 90 days.

Ranking history

eslint-plugin-react-refresh npm ranking history: currently #112 (by weekly downloads).eslint-plugin-react-refreshnpm ranking · by weekly downloads · Last 90 days#112current rank#20#40#60#80#100#120Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
eslint-plugin-react-refresh npm ranking history: currently #112 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 6, #12 (overall #112)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins290 listings · 15 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 (592)
Recent weekly downloads observations for eslint-plugin-react-refresh
Date (UTC)Weekly downloadsChange vs. previous
29,774,050-2.7M
32,476,719+1.4M
31,050,741+1.3M
29,762,014+695K
29,067,054+706K
28,361,032+68.5K
28,292,515+43.3K
28,249,235-667.9K
28,917,123-956.3K
29,873,465-706.8K
30,580,223-436.9K
31,017,093-453.7K
31,470,743-620.8K
32,091,565—

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 Dec 6, 2026. See the methodology.