aidenybai / aidenybai/trying-to-understand-render-order
React Review Audit
- Ngôn ngữ chính
- JavaScript
- Star
- 2
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
**Score: 99/100** · 0 errors · 3 warnings
Copy as prompt
```text
Fix the following React Review diagnostics in my codebase.
## Warnings (3)
1. [warning] rerender-functional-setstate — src/main.jsx:90
setCount(count + ...) — use functional update to avoid stale closures
2. [warning] rerender-functional-setstate — src/main.jsx:91
setCount2(count2 + ...) — use functional update to avoid stale closures
3. [warning] rerender-functional-setstate — src/main.jsx:95
setCount2(count2 + ...) — use functional update to avoid stale closures
```
---
### ⚠️ Warnings (3)
**`rerender-functional-setstate`**
setCount(count + ...) — use functional update to avoid stale closures
> Use the callback form: `setState(prev => prev + 1)` to always read the latest value
[`src/main.jsx:90`](https://github.com/aidenybai/trying-to-understand-render-order/blob/909cbca624571e0dee5ddf385c07ba2a57d6e9fc/src/main.jsx#L90)
[`src/main.jsx:91`](https://github.com/aidenybai/trying-to-understand-render-order/blob/909cbca624571e0dee5ddf385c07ba2a57d6e9fc/src/main.jsx#L91)
[`src/main.jsx:95`](https://github.com/aidenybai/trying-to-understand-render-order/blob/909cbca624571e0dee5ddf385c07ba2a57d6e9fc/src/main.jsx#L95)
---
Last scored May 18, 2026 at 10:18 AM UTC. Maintained by [React Review](https://github.com/millionco/react-review).
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.