Add an Offline Status Indicator to a PWA with React
Since we can view our app offline now, it may be important to tell our users that the app is operating in an offline mode. That way, we can let the user know that the app may not be fully functional until then re-connect to the Internet.
navigator.onLine to detect if there is a network connection present or not, and then we'll listen for the window's
offline events to update the offline badge.