79387305

Date: 2025-01-25 18:51:29
Score: 0.5
Natty:
Report link

Hello,

You're expecting when updating the database it will auto-update in the frontend, while this is not possible.

There are many frameworks and libraries made to make this thing possible (easier) such as React.

When updating the database what happens?

  1. A request gets established to the server
  2. The Server receives the request
  3. The Server requests from the database server an update
  4. The server sends back a response that the object or model was updated

Now, this is the general thing that happens, how would the front end even know that the database was updated? so you must add auto-refreshing code, or the user must reload the page.

Also server cant send a request to the frontend. And server responses cannot change the frontend, the thing that changes frontend after rendering is including a script in it.

Thats' it.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: The Khateeb Dev