Managing Stream State with RxJS Scan
Learn to accumulate, aggregate, and manage application state within a single observable stream using the RxJS scan operator.
-
💬
AI instructor
Ask about any lesson and get a clear answer instantly, anytime. -
🕐
Start anytime
No schedules or deadlines — learn at your own pace, whenever suits you. -
🌐
In English
Lessons, tasks and certificate — all fully in your language.
About this course
Course contents
6 modules · 24 lessons · 3h 1m
1
Fundamentals and Concepts
Understand the difference between imperative and declarative state management and learn key terminology.
- Welcome to the World of Reactive State
An introduction to the importance of managing state within streams instead of using external variables.6 min - Imperative vs. Declarative
A comparison between manually updating variables and using RxJS pipelines.8 min - Reactive Programming Dictionary
Defining core terms such as Stream, Operator, and Emission.7 min - Single Stream Mechanics
How data moves through a single Observable and how we can intercept it.7 min
2
Anatomy of the Scan Operator
Understand how the scan operator works internally and how to use it to aggregate values.
- What is the Scan Operator?
Learning the basic function of scan as a tool for accumulating values over time.8 min - The Accumulator Function
Understanding the first argument of scan and how to merge the previous value with the new one.8 min - The Seed Value
The importance of the initial state and how to define the starting point for accumulation.7 min - Sequential Accumulation
How scan emits values incrementally with each new input.7 min
3
Scan vs. Reduce
Distinguishing between the two operators and choosing the most suitable one for each use case.
- Introduction to the Reduce Operator
How reduce works in RxJS and when it stops processing.7 min - The Big Battle: Scan vs. Reduce
A direct comparison of behavior and results between the two operators.8 min - Intermediate vs. Final States
Understanding when we need to see the progression (scan) versus when we only need the final result (reduce).8 min - Real-World Scenarios
Practical examples that necessitate choosing one operator over the other.7 min
4
Types and Safety with TypeScript
Securing data streams using TypeScript to prevent common errors.
- Defining Accumulator Types
How to write interfaces to describe the state within scan.8 min - Complex State Objects
Handling states with multiple properties and securing them programmatically.8 min - Automatic Type Inference
How TypeScript infers types from the seed value and how we can assist it.7 min - Debugging Type Errors in Scan
Identifying common TypeScript error messages when using scan and how to resolve them.7 min
5
Avoiding Common Mistakes
Learning how to write clean, safe, and memory-efficient code.
- The Danger of State Mutation
Why you should never directly modify the previous state inside scan.8 min - The Power of Pure Functions
Using the spread operator to create new copies of the state.8 min - Memory Leaks in Streams
How scan can cause issues if the stream is not properly terminated.7 min - Managing Subscription Lifecycle
Best practices for unsubscribing and cleaning up state-related resources.7 min
6
Practical Patterns and Application
Applying everything learned to build real-world state management patterns.
- Advanced Counter Pattern
Building a counter that handles incrementing, decrementing, and resetting using scan.8 min - Action Accumulator
How to transform a stream of commands into a single aggregated state.8 min - Building a Simple Reactive Store
Creating a mini version of Redux using only RxJS scan.8 min - Self-Contained State Pipelines
Combining all concepts to transform raw data into an organized and final state stream.9 min
Reactive Shopping Cart Tracking System
You will build a complete shopping cart logic where actions (add product, delete, change quantity) are received via a single stream, using the scan operator to update the total price and item count entirely declaratively.
What you'll get
-
📜
Certificate of completion
Add it to your LinkedIn profile -
💬
Personal AI tutor
Stuck on a lesson? Ask your built-in tutor anything, any time. -
🎧
Audio version included
Learn on the go — no screen needed -
♾️
Lifetime access
Come back anytime, no expiry -
📱
Phone or computer
Works anywhere, any device -
💸
14-day refund
No questions asked -
⚡
Short & focused
3h 1m of practical content
Certificate of completion
Every course you complete on PickAClass issues a credential like this — original, with its own code, verifiable by URL, and detailed about what was actually demonstrated.
Reviews
No reviews yet — be the first to share your experience.
Learners also took
Modern Java Essentials: Functional Programming, Records, and Modern Features
Asynchronous Programming and Multithreading in C#
Writing High-Performance Python: Optimize Speed and Memory
Go Programming by Example: Build Reliable Applications
Frequently asked
What do I need to take this course? +
Just a phone or computer with internet. No installs, no special hardware.
How do I pay? +
By card via Stripe. We don’t store card details — Stripe handles them securely.
Can I get a refund? +
Yes — full refund within 14 days, no questions asked.
How long will I have access? +
Forever. Once you purchase, the course is yours to revisit anytime.
Will I get a certificate? +
Yes. On completion you'll receive a certificate you can add to your LinkedIn profile.
Get 10 courses a month
Members get 10 courses of their choice every month for £0. No per-course charges — you pay only the subscription.
- ✓ 10 courses every month
- ✓ Cancel anytime
Renews monthly. Unused courses expire at the end of each billing month.