How to define websocket globally in vue project, and send and receive messages in various pages and components?

is there a package for websocket that can be defined globally and used in various components?

for example, how should js definitions in main.js or utils be introduced and used in various components? At the same time to solve the problem of frequent disconnection?

May.22,2022

can be defined in a file

  https://github.com/pladaria/r...

Menu