Effect in the Frontend: Using Queues and Streams

preview_player
Показать описание


00:00 Intro
00:52 App & Challenge Overview
02:12 Detailed Requirements
05:03 Project Structure
07:53 Scaffolding the Queue + Stream
14:56 Offering Elements to the Queue
16:52 Creating the useMarkMessagesAsRead Hook
22:17 Consuming the Hook
24:09 Testing the Batch Processing
25:31 Creating the sendBatch Computation w/ Exponential Retries & Concurrency
30:01 Handling the Focus State
32:46 Graceful Error Handling
33:24 Network Monitor: Queuing up Requests if Offline
40:52 Testing the Network Latch
Рекомендации по теме
Комментарии
Автор

Queue, stream, fork, fiber, latch, concurrency, retry... Amazing how many concepts you touch with simple code, bravo!
I'm coding a simple Effect code to track engagement/analytics of content consumed by user in the frontend, and your solution is suuuper handy.

guillemdeveloper
Автор

Great video Lucas, always like seeing Effect being used.

Btw, is there a way to get a smaller bundle size when using it? I don't like how it always add at least 100kb to my frontend bundle when building the react vite project 😔

TianYuanEX
Автор

First of all, great video, tyvm. Why are you using a queue and not simply feeding the IDs straight to the stream?

pheisar
Автор

can you please make a video or add a solution link to do the whole question without effect, making it a beginner friendly ?

sohamnandi
Автор

whats your editor, sir? is it webstorm from jetbrains?

blank_bow
welcome to shbcf.ru