---
title: "Discussion on \"React Data Fetching Without Race Conditions: AbortController in useEffect\" | Hashnode"
description: "Discussion on \"React Data Fetching Without Race Conditions: AbortController in useEffect\". The naive effect left User 1 on screen after userId flipped from 1 (80 ms) to 2 (10 ms). The same test with AbortController showed User 2 and aborted 1 of 2 requests."
url: "https://hashnode.com/posts/react-useeffect-abortcontroller-race/6b05157f78c349c496ca8a76"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [React Data Fetching Without Race Conditions: AbortController in useEffect](https://gowthammuthuvel.hashnode.dev/react-useeffect-abortcontroller-race?utm_source=hashnode&utm_medium=feed)

The naive effect left User 1 on screen after userId flipped from 1 (80 ms) to 2 (10 ms). The same test with AbortController showed User 2 and aborted 1 of 2 requests.

6h ago · 11 min read · gowthammuthuvel.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#useeffect](https://hashnode.com/tag/useeffect)
-   [#testing](https://hashnode.com/tag/testing)
-   [#frontend](https://hashnode.com/tag/frontend)
-   [#reactjs](https://hashnode.com/tag/reactjs)

## Written by

[Gowtham Muthuvel](https://hashnode.com/@GowthamMuthuvel)

@GowthamMuthuvel

  
[View profile](https://hashnode.com/@GowthamMuthuvel)

Full-stack developer | Java, Spring Boot, React | Senior Backend Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
