dsuryd / dotNetify

Simple, lightweight, yet powerful way to build real-time web apps.
https://dotnetify.net
Other
1.17k stars 164 forks source link

Invoking a 'connected' event after connecting? #171

Closed Simcon closed 5 years ago

Simcon commented 5 years ago

Is there a way I can hook into a 'connected' event after the dotnetify.vue.connect method?

    var vue = new Vue({
        el: '#App',
        data: {
            Id: '',
         },
        created: function () {
            var qs = getQueryString();
            var id = qs.id;
            this.vm = dotnetify.vue.connect("WorksheetVm", this, { vmArg: { Id: id } });
        },
dsuryd commented 5 years ago

There's no specific event for that; I usually use the component's life cycle hook like Vue's beforeUpdate to get notification when new state is received.