Skip to content

React Review Audit #446

@reactreview

Description

@reactreview
⚠️ 5 warnings 99 score
Copy as prompt
Fix the following React Review diagnostics in my codebase.

## Warnings (5)

1. [warning] button-has-type — packages/website/src/components/terminal.tsx:172
   `<button>` elements must have an explicit `type` attribute.

2. [warning] button-has-type — packages/website/src/components/terminal.tsx:222
   `<button>` elements must have an explicit `type` attribute.

3. [warning] no-initialize-state — packages/website/src/components/terminal.tsx:278
   Avoid initializing state in an effect. Instead, initialize "state"'s `useState()` with "COMPLETED_STATE". For SSR hydration, prefer `useSyncExternalStore()`.

4. [warning] no-initialize-state — packages/website/src/components/terminal.tsx:327
   Avoid initializing state in an effect. Instead, initialize "state"'s `useState()` with "undefined". For SSR hydration, prefer `useSyncExternalStore()`.

5. [warning] button-has-type — packages/website/src/components/terminal.tsx:409
   `<button>` elements must have an explicit `type` attribute.

⚠️ Warnings (5)

`<button>` elements must have an explicit `type` attribute. · 3 in 1 file

button-has-type

Set type="button" (or "submit" / "reset") explicitly on every &lt;button&gt;.

File Lines
packages/website/src/components/terminal.tsx 172, 222, 409
Avoid initializing state in an effect. Instead, initialize "state"'s `useState()` with "COMPLETED_STATE". For SSR hydration, prefer `useSyncExternalStore()`. · 2 in 1 file

no-initialize-state

Pass the initial value directly to useState() instead of setting it from a mount-only useEffect. For SSR hydration, prefer useSyncExternalStore().

File Lines
packages/website/src/components/terminal.tsx 278, 327

Reviewed by reactreview for commit 4e23e5d. Configure here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions