How does antd enable the number of logos to be updated in real time?


11:

take into account that when browsing a web page, the number of logos may also increase when the page is not refreshed.
how do I update my logo count in real time?

Mar.12,2021

if it is only implemented in the foreground, you can only use a timer and keep requesting, which consumes too much memory

Real-time updates are basically based on socket protocol. You can take a look at

.
Both the read and unread status of the

message should be recorded in the database. When you read the message, you should send a ajax request to mark the message as read, and then use ajax to get the status of the message. Several messages are unread and then displayed.

to display the real-time data of unread messages, you can use websocket . When the message is received by the background, it is pushed over, and then update state is fine.

therefore, ajax request is used when actively manipulating data, and websocket

is used when passive.

you can use the setstate method. This will be updated in time


Hello, is the problem solved? I also encountered this problem, ask


Hello, have you ever added a logo to the cooking menu?

Menu