Skip to content

refactor: Fix React Compiler hint in CheckboxField #1072

Description

@frankieyan

Part of #1066.

  • File: src/checkbox-field/checkbox-field.tsx
  • Violation: Support destructuring of context variables (Hint, line 66): the prop destructuring in the forwardRef render function.

Steps

  1. Reproduce and confirm. Hint severity, but the component is still not memoized (confirmed in the compiled output).
  2. Fix per #mutating-props (the prop reassignment of indeterminate on line 73 is the underlying mutation).
  3. Confirm the count dropped; let the hook update the record file.
  4. Verify memoization in the compiled output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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