UNPKG

impair

Version:

impair is a React framework bringing several programming concepts together in order to provide a foundation for a layered, scalable, performant and enterprise level react application.

14 lines (13 loc) 657 B
/** * Registers a library-produced wrapper component with the active react-refresh runtime. * No-op when react-refresh is not available (production builds, SSR, non-Vite/Webpack tooling). * * Without this, `component()` returns a fresh `memo(...)` wrapper every time a user module * re-evaluates under HMR. React then sees a brand-new component type, unmounts the old subtree * and remounts a new one, which destroys all view-model state on every save. */ export declare function registerComponentForFastRefresh(comp: unknown, fn: { displayName?: string; name?: string; toString?: () => string; } | undefined, idOverride?: string): void;