networkv1.2

network module

Network status and connectivity detection.

Available Methods

sdk.network.getStatus()
sdk.network.onStatusChange()

Example Usage

import { usePoremi } from '@poremi/react-sdk';

function NetworkExample() {
  const { sdk } = usePoremi();

  useEffect(() => {
    const unsub = sdk.network.onStatusChange(status => {
      if (!status.connected) alert('You are offline');
    });
    return () => unsub();
  }, []);
}

Try in Playground

🔒 Log in to open this example in the interactive playground.