Answer the question
In order to leave comments, you need to log in
How to implement sending and receiving notifications in real time on the site?
Front of the site is written in ReactJS, Back - php + sql. A notification system has been developed, i.e. all notification information is stored in the database, but so far it only works after the page is reloaded. I was advised to use websockets. And I need advice. Maybe there are frameworks, libraries, ready-made examples for solving this problem for these tools that I listed above?
Answer the question
In order to leave comments, you need to log in
Try centrifugo:
https://github.com/centrifugal/centrifugo
For php they have a library:
https://github.com/centrifugal/phpcent
Ajax shouldn't be a problem. Did you work with promises?
Send a request to the server, display information depending on the response. And it will all work without reloading the page.
If everything is tied to transitions there, then I have a question, do you use react-routes? I think not, but it should, and then everything will work fine too
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question