aidenybai / aidenybai/fiber-explorer

React Review Audit

未关闭
#1 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
6
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

**Score: 99/100** · 0 errors · 2 warnings

Copy as prompt

```text
Fix the following React Review diagnostics in my codebase.

## Warnings (2)

1. [warning] no-derived-useState — app.jsx:6
useState initialized from prop "init" — if this value should stay in sync with the prop, derive it during render instead

2. [warning] rerender-functional-setstate — app.jsx:11
setCount(count + ...) — use functional update to avoid stale closures
```

---

### ⚠️ Warnings (2)

**`no-derived-useState`**

useState initialized from prop "init" — if this value should stay in sync with the prop, derive it during render instead

> Remove useState and compute the value inline: `const value = transform(propName)`

[`app.jsx:6`](https://github.com/aidenybai/fiber-explorer/blob/b52594ac3999e2460906938157e2dd336b959277/app.jsx#L6)

**`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

[`app.jsx:11`](https://github.com/aidenybai/fiber-explorer/blob/b52594ac3999e2460906938157e2dd336b959277/app.jsx#L11)

---

Last scored May 18, 2026 at 10:18 AM UTC. Maintained by [React Review](https://github.com/millionco/react-review).

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。