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
756
Weekly
7.1M
Open issues
9
Bundle
~15 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
- 7.1M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~15 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 9 open issues on GitHub