W
W
webe2018-09-29 17:53:21
React
webe, 2018-09-29 17:53:21

How to get data without action?

There is a field in the header: "total hits, new, in the last hour"
How to make this field updated in real time, what are the options other than web sockets?
(i.e. if the user has gone to drink tea, then the fields should still be updated)
So far, only the timer comes to my mind, which will contact the server and dispatch to the editor every 30 seconds.
Am I doing the right thing by inserting setInteverl into componentDidMount and it will already dispatch the action that calls the server
. Are there any other options?
I heard about some kind of RXJS , do I need to dig in this direction?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question