Skip to main content
Version: Next

CommandKitHMREvent

CommandKitHMREvent

Represents an HMR event in CommandKit.

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

event

property

The type of HMR event.

path

property
string

The path associated with the 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.