React Clean Code - Advanced TDD with MirageJS and React-Query (Part 2)

Опубликовано: 18 Апрель 2026
на канале: I Code It
499
14

React Clean Code Book: https://leanpub.com/react-clean-code/... (30% off)
In this one-hour video tutorial, I'm going to show you how to apply Test-Driven Development to implement a feature for an online ordering application. It also covered mirage js for mocking and react-query for managing network requests.

5 Essential Steps for Applying TDD: https://icodeit.ck.page/5-steps-tdd
Maintainable React: https://leanpub.com/maintainable-react
Maintainable React Cheatsheet: https://icodeit.ck.page/maintainable-...

Table of Contents:

00:25 - About me
01:14 - Start of the tutorial
04:01 - Simulate long tasks
08:48 - Introduce React Query
13:28 - Define query function
21:00 - Fix tests
28:03 - Notify the store
32:50 - Introduce useMutation
38:58 - Mock post request
41:18 - Message for notified state
42:36 - Error handling for notifying the store
46:40 - All the tests are passing
47:25 - Some final refactorings