# Keep Side Effects Outside The Reducer

> Keep navigation, analytics, API calls and snackbars outside pure transitions.

- URL: https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/03-state-machine-mvvm/lesson-05-keep-side-effects-outside-reducers
- Course: [Mobile Action Pro](https://dantech.academy/en/courses/kotlin-accelerator.md)
- Module: State Machine and MVVM
- Duration: 12 min
- Difficulty: intermediate
- Access: Enrolled students
- Tiếng Việt: https://dantech.academy/courses/kotlin-accelerator/engineer-builder/03-state-machine-mvvm/lesson-05-keep-side-effects-outside-reducers.md

## Objectives

- Keep the reducer pure by returning typed effect descriptions
- Carry out each effect in a narrow adapter with one collaborator

## In this lesson

1. Lesson Goal
2. Part 1: An Effect In DRE Is A Task Description
3. Part 2: Read The handleBackToMenu Function
4. Part 3: When To Use An Effect, When To Use An Async Op?
5. Code Reading Path
6. Bad Smells
7. Key Takeaways

## Study with an AI agent

The full lesson is for students of this course. Students open the lesson on the web and press **Markdown** to copy all of it, then paste it into Claude, ChatGPT, Cursor or whichever agent you use. Faster: mint a token at `/profile/ai-agents` and your agent reads lessons over MCP.

- [Join the course](https://dantech.academy/en/kotlin-accelerator/checkout)

---

- Previous lesson: [Wire The ViewModel To The DRE Store](https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/03-state-machine-mvvm/lesson-04-wire-viewmodel-with-store.md)
- Next lesson: [Use Case: The App's Unit Of Business Logic](https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/04-clean-architecture-integration/lesson-01-read-domain-use-cases.md)
