From d81b8d05de445145c8ce09088deac825f667b636 Mon Sep 17 00:00:00 2001 From: Mike Christensen Date: Tue, 25 Jun 2024 08:29:59 +0100 Subject: [PATCH] example: prevent infinite use effect loop Adds the missing dependency array to the useEffect in the Project to avoid an infinite loop. --- examples/livesync/components/Project/Project.tsx | 2 +- package-lock.json | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/livesync/components/Project/Project.tsx b/examples/livesync/components/Project/Project.tsx index 933f10c..a14859a 100644 --- a/examples/livesync/components/Project/Project.tsx +++ b/examples/livesync/components/Project/Project.tsx @@ -20,7 +20,7 @@ export const Project = ({ issues: initialIssues, id }: Props) => { } reload(); - }); + }, [id]); return ( diff --git a/package-lock.json b/package-lock.json index ece9c1d..7e1a007 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5282,9 +5282,9 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "engines": { "node": ">=10.0.0" }, @@ -8943,9 +8943,9 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "ws": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", - "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "requires": {} }, "y18n": {