I am currently working on a web application using React to build the frontend and SpringBoot to build the backend. I have built a backend REST API that interacts with a MySQL database. My problem is that I want my data to be refreshed/reloaded on the frontend when something changes in the backend database.
I looked up some tutorials online about using WebSockets, but they confused me even more. Does anyone have experience with this type of problem/any solutions? A solution for WebSockets is also available.
A simple solution is polling. In the client you can get data from the backend every 5 seconds to check if there is new content.
There are many solutions to this problem, depending on your use case.