Skip to main content
Version: 0.1.1

Function: resetDefaultAdapterScopes()

Imported from @react-logic/di

resetDefaultAdapterScopes(): void

Disposes the default adapter's global scope and replaces it with a fresh one. Intended for HMR cycles in dev — call from a bundler-specific hook (see installViteHMR, installWebpackHMR, installParcelHMR) so service onDestroy callbacks fire and stale class identities don't pile up.

Has no effect on user-created scopes (e.g. those from <Injector>); their lifetimes are owned by React mount/unmount.

Returns

void