Skip to main content
Version: 0.1.1

Function: installWebpackHMR()

Imported from @react-logic/di

installWebpackHMR(hot): void

Wires the default adapter's reset into Webpack's HMR dispose hook. Webpack fires this when this module is replaced; pair with module.hot.accept() if you want it to fire on broader updates.

Parameters

hot

false | DisposableHot | undefined

Returns

void

Example

// main.tsx
import { installWebpackHMR } from '@react-logic/di';
installWebpackHMR(import.meta.webpackHot);