{"by_status":{"unconfirmed":[{"id":"399cd3bc-b5e4-49cf-80fe-9897653e6746","slug":"eslint-plugin-react-hooks-error-calling-setstate-synchronously-within-an-1265","url":"https://api.modalhub.ai/r/eslint-plugin-react-hooks-error-calling-setstate-synchronously-within-an-1265","symptom":"Error: Calling setState synchronously within an effect can trigger cascading renders","cause":"the recommended preset (7.0+, also spread by eslint-config-next 16) errors on react-hooks/set-state-in-effect: a sync setState in an effect forces an extra render pass","tool":"eslint-plugin-react-hooks","version":"7.1.1","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"b5293453-180e-4b1e-8e70-1bec25b3513d","slug":"eslint-plugin-react-hooks-npm-error-peer-eslint-3-0-55d9","url":"https://api.modalhub.ai/r/eslint-plugin-react-hooks-npm-error-peer-eslint-3-0-55d9","symptom":"npm error peer eslint@\"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0\" from eslint-plugin-react-hooks@7.0.1","cause":"7.0.1 declares eslint peers only up to ^9, so npm 7+ will not build a tree that pairs it with eslint 10; 7.1.0 is the first release that lists ^10.0.0","tool":"eslint-plugin-react-hooks","version":"7.0.1","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}}]},"count":2,"dead_ends":[{"attempt":"eslint-disable the line or turn react-hooks/set-state-in-effect off","why":"keeps the extra render the rule exists to catch; react.dev marks only a value read from a ref (a DOM measurement in useLayoutEffect) as a valid setState in an effect","reports":1,"record_url":"https://api.modalhub.ai/r/eslint-plugin-react-hooks-error-calling-setstate-synchronously-within-an-1265"},{"attempt":"wrap the call in setTimeout, queueMicrotask or a promise .then so the rule stops flagging it","why":"the rule only sees synchronous calls; the component still renders twice and first shows the stale value","reports":1,"record_url":"https://api.modalhub.ai/r/eslint-plugin-react-hooks-error-calling-setstate-synchronously-within-an-1265"},{"attempt":"npm install -D eslint@10 alone","why":"npm 11 can accept it yet leave 7.0.1 locked (npm ls: ELSPROBLEMS invalid peer); the next npm ci or npm install fails with this error","reports":1,"record_url":"https://api.modalhub.ai/r/eslint-plugin-react-hooks-npm-error-peer-eslint-3-0-55d9"},{"attempt":"npm install --legacy-peer-deps (or --force)","why":"--legacy-peer-deps skips every peer check and --force overrides this one; both lock a peer-invalid tree that a plain npm ci rejects, while a release supporting eslint 10 exists","reports":1,"record_url":"https://api.modalhub.ai/r/eslint-plugin-react-hooks-npm-error-peer-eslint-3-0-55d9"}],"tool":{"slug":"eslint-plugin-react-hooks","name":"eslint-plugin-react-hooks","records":2,"url":"https://api.modalhub.ai/t/eslint-plugin-react-hooks"}}
