React Refresh Webpack Plugin
@pmmmwh/react-refresh-webpack-plugin
An **EXPERIMENTAL** Webpack plugin to enable "Fast Refresh" (also previously known as _Hot Reloading_) for React components.
Utilities
react
javascript
webpack
refresh
hmr
hotreload
livereload
live
edit
hot
Stars
3.2k
Weekly
4.5M
Open issues
54
Bundle
~25 kB
Installation
npm install @pmmmwh/react-refresh-webpack-pluginCode example
import { useRefreshWebpackPlugin } from "@pmmmwh/react-refresh-webpack-plugin";
export function Example() {
const value = useRefreshWebpackPlugin();
return <p>{String(value)}</p>;
}Pros & cons
Pros
- Actively maintained by Michael Mok
- 4.5M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~25 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 54 open issues on GitHub