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.
After upgrading to React 19, the
useCountUphook started to throw a TypeScript warning.Adding support for React 19 and generating new types should fix the issue.