Home > Mobile >  After data changes, how can I bring up the admin dashboard in real time in react?
After data changes, how can I bring up the admin dashboard in real time in react?

Time:10-19

I'm new to the MERN stack and I'm looking for a library that allows me to load data in real time, so that when an order is placed, the admin dashboard receives the data right away, with no need to reload. The way I can transmit updates and notifications in real time from the server is beyond me. A tutorial or documentation link would be greatly appreciated. To be completely honest, I have no idea what it is called.

CodePudding user response:

Well, there is a number of ways you can achieve that.

  • You can use Ajax long or short pulling, which will continuously pull the latest data from the backend.
  • You can use Server Sent Events. This one probably your needs the best.
  • You can use Sockets, and push events from the back-end when data changes.
  • Related