DEV Community

Discussion on: Creating a VueJS component for online/offline events

jcalixte profile image
Julien Calixte Author

You're right, I think I can be more precise on why to use this component.
This component can be useful when your app needs to display different things when the user is online and when he is offline. For example, I'm currently developing a PWA that stores articles for offline reading. With the component vue-online-offline, I can tell to an other <ArticleList /> component to stop fetching the API and only display articles stored locally. This way, I only display articles to the user he will be able to read.

More simple, it can be used to display or not an offline icon.

Is this more comprehensible?