We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
is it possible to set a HubProxy to a variable and access its methods? For example:
conectarChat() { const connection = signalr.hubConnection(url); connection.logging = true; const proxy = connection.createHubProxy('chatHub'); this.proxy_signalr = proxy; // ... connection start and other stuff }
componentDidMount() { this.conectarChat(); this.proxy_signalr.on('msgRecebida', (id_enviou, id_recebeu, mensagem) => { //some function }); }
If the .on method is within conectarChat() function it works perfectly.
Thanks, Bruno
The text was updated successfully, but these errors were encountered:
This works for the .invoke method: this.proxy_signalr = connection.createHubProxy('chatHub');
I changed my logic to let the .on methods access signalr proxy inside the main method and solved my problem.
Sorry, something went wrong.
No branches or pull requests
Hello,
is it possible to set a HubProxy to a variable and access its methods?
For example:
If the .on method is within conectarChat() function it works perfectly.
Thanks,
Bruno
The text was updated successfully, but these errors were encountered: