Skip to content

React 19 support #877

Description

@franknoel

After upgrading to React 19, the useCountUp hook started to throw a TypeScript warning.

Type 'RefObject<HTMLElement | null>' is not assignable to type 'string | RefObject<HTMLElement>'.
  Type 'RefObject<HTMLElement | null>' is not assignable to type 'RefObject<HTMLElement>'.
    Type 'HTMLElement | null' is not assignable to type 'HTMLElement'.
      Type 'null' is not assignable to type 'HTMLElement'.ts(2322)

Adding support for React 19 and generating new types should fix the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions