nuxt-community / laravel-echo-module

Laravel Echo for Nuxt 2
MIT License
85 stars 32 forks source link

Request Delay before echo.connect() #21

Open mean-cj opened 4 years ago

mean-cj commented 4 years ago

Hello

Thank you for your project.

Please add the delay time option before echo.connect() because when i need start socket.io after page load completed

Thank.

mean-cj commented 4 years ago

i see your option connectOnLogin is not working because laravel-echo have been auto connect() on constructor

   constructor(options: any) {
        this.setOptions(options);
        this.connect();
    }

what do you think?

ricardogobbosouza commented 3 years ago

Hi @mean-cj Fixed on version: 2.0.0-alpha.1 https://github.com/nuxt-community/laravel-echo-module/blob/main/src/runtime/echo.ts#L10 https://github.com/nuxt-community/laravel-echo-module/blob/main/src/runtime/echo.ts#L60 PS: I need to update docs

47

ricardogobbosouza commented 3 years ago

I will add hooks between the connections of the laravel-echo

44