To see it in action, try disabling and then re-enabling your Internet connection.
If you're using Google Chrome, you can also artificially throttle the network to test its behavior under different conditions.
Usage
You can use useNetworkStatus() to retrieve both current and previous network status.
It must be used within the browser context, otherwise it will return null.
Current
You can get the current status by calling the current method.
Previous
You can get the previous status by calling the previous method.
It defaults to undefined if the network status hasn't been updated since the component mounted.