Skip to main content
Version: 1.x

CommandKitHMREvent

CommandKitHMREvent

Represents an HMR event in CommandKit.

Signature
interface CommandKitHMREvent {
event: HMREventType;
path: string;
changeType?: HMREventChangeType;
accept: () => void;
preventDefault: () => void;
}

event

property

The type of HMR event.

path

property
string

The path associated with the HMR event.

changeType

The original filesystem change type that triggered this HMR event.

accept

property
() => void

Accepts the HMR event, indicating that it has been handled. This prevents further processing of the event.

preventDefault

property
() => void

Prevents the default action for the HMR event. This can be used to stop further processing of the event.