stop

stop(): void

Source: main.ts:207

Stops listening for device orientation updates and detaches event listeners.

Use this when navigating away from a view or unmounting components to save battery and resources.

Returns

  • void

Example

CODE
import { deviceRotation } from "web-orientation";

onDestroy(() => {
  deviceRotation.stop();
});