What is eslint-plugin-react-refresh, and how do you fix its errors?

eslint-plugin-react-refresh is an ESLint plugin with one rule, react-refresh/only-export-components. It flags files that export a React component next to something else, like a helper, a constant or a context, because Fast Refresh can't update those files in place. The fix is almost always to move the extra export to its own file.

By Nabil A. Updated December 4, 2026

A warm wave of orange and red light over deep blue

Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

See how out of date your code is.

Any public GitHub repository. No sign-in.

Tell your agent what changed since it was trained.

claude mcp add --transport http since https://api.since.dev/mcp

Codex, Cursor and any MCP client use https://api.since.dev/mcp.