Skip to main content
Version: 0.1.2

Function: installParcelHMR()

Imported from @react-logic/di

installParcelHMR(hot): void

Wires the default adapter's reset into Parcel's HMR dispose hook.

Parameters

hot

false | DisposableHot | undefined

Returns

void

Example

// main.tsx
import { installParcelHMR } from '@react-logic/di';
// Parcel exposes HMR via the CommonJS-style `module.hot`.
installParcelHMR((module as unknown as { hot?: { dispose(cb: () => void): void } }).hot);