-1

I am using Vue for an order application, I want to know in front-end if there is new order came to back-end, to add it to the pending table in vue I don't know really what is the best practice . I have see Signal R but I am not sure what to do. I would be appreciate a small advice . I don't want to refresh the page

1 Answers1

0

It would depend on the features provided by the backend. The "simplest" way is for your Vue app to continually poll the backend with AJAX requests, and update the Vuex state.

You can also use Web Sockets or Server Side Events (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) so the backend can push the event to your Vue app.

Will Fong
  • 26
  • 3