Flask + SSE + React | How to use Server Sent Events with Flask and React

preview_player
Показать описание
Quick tutorial on using Server Sent Events with react and flask.
Please like and or subscribe if you found this helpful!
Рекомендации по теме
Комментарии
Автор

Great guide, thanks a lot, it's very usefull !
Looks like I'm not able to use SSE while using Next.js ... I think has something to do with a proxy rewrite + compression, such a shame

jordialmendros
Автор

Do you think using SSE is better approach than ... flask-socket-io ? Or am I misunderstanding how differently both approaches can be used? For example let's say I have a backend which also is communicating with Hardware (Camera, PLC or something) and then I'm doing some kind of processing with the given data from the hardware and then I want to update UI from the server side. Should I be using multiple while loops with Threads + Queue mechanisms (so while loops wouldn't eat CPU time) or I should use Sockets for such thing ? Sorry for the long question and thank you for the video ! <3

blankcode
Автор

Hi, do you know how to make this work cross origin? We are struggling with that 😅

juliushuck
join shbcf.ru