---
title: "Discussion on \"React UseEffect Hooks\" | Hashnode"
description: "Discussion on \"React UseEffect Hooks\". UseEffect with  infinite loop fix\nexport default function DataLoader() {\n  const [data, setData] = useState([]);\n\n  useEffect(() => {\n    fetch(\"http://localhost:3001/links/\")\n      .then(response => response.json())\n      .then(data => setData(data)..."
url: "https://hashnode.com/posts/react-useeffect-hooks/5f94096afbdce372c9a56e14"
---

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

Discussion

# [React UseEffect Hooks](https://sannyblog.hashnode.dev/react-useeffect-hooks?utm_source=hashnode&utm_medium=feed)

UseEffect with infinite loop fix export default function DataLoader() { const \[data, setData\] = useState(\[\]); useEffect(() => { fetch("http://localhost:3001/links/") .then(response => response.json()) .then(data => setData(data)...

Oct 24, 2020 · 4 min read · sannyblog.hashnode.dev  
Read the article

## Written by

[Santhosh P](https://hashnode.com/@psanny11)

@psanny11

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

State&Behaviour Matters

## Responses

Comments are turned off for this post.
