MODULO Full Stack Web Development: The Ultimate Master SagaTHEORY
Keep an old response off the screen
Build a course-detail component whose effect fetches a record when courseId changes. Switch from course A to course B while A is still loading. Use effect cleanup to abort the older request or ignore its result.
Check your work
Delay A so its response arrives last. The heading and description should still show B, and an intentionally aborted request should not display an error. Verify that courseId is in the dependency list.
