React Clean Code - Simulate Network Scenarios with Mirage with Mirage.js.js In my book Maintainable React, I introduced a feature I had worked on a while ago. The feature is interesting in many ways, and I selected it as it involves several states in the view. They are not typical UI states but server cache states.
Table of contents
React Clean Code — Simulate Network Scenarios with Mirage.jsDifferent statusThe happy pathMocking the request for happy pathImplementing fetch with react-querySimulate an errorSimulate retries when request failedThe final codeSummarySort: