I am not a web dev, so please bear with me, but what is the best way to currently "display a value and sync its current value" with a backend. When I look this up online I see either mega huge sized Javascript libraries to do this, or to make a simple Javascript loop that polls an API route every few seconds. There must be a better way.
Basically I want a text label with up and down arrow buttons next to it, and when the user presses up and down the counter increments by one, and anyone else on the same webpage from a different device sees the change in hopefully as real time as possible. I think maybe I could use a web-socket to a backend and then sync data through that (IE: Button Press event to backend, backend propagates to other web-socket connections), but I'm trying not to overthink it as I have never written Javascript before so hopefully there is an easier way.
When I ask any of the LLM chatbots for help they jump into React and I'd rather blow my head smooth off than make a 50 mb webpage for something that should be simple.