reactfire icon indicating copy to clipboard operation
reactfire copied to clipboard

Support for React 19 types in AuthProvider

Open devth opened this issue 10 months ago • 0 comments

Version info

React: 19

Firebase: 11.0.2

ReactFire: 4.2.3

Other (e.g. Node, browser, operating system) (if applicable): Node 20

Problem

As of this change to react/@types, reactfire no longer type checks. It errors like:

Type error: 'AuthProvider' cannot be used as a JSX component.
  Its type '(props: PropsWithChildren<{ sdk: Auth; }>) => Element' is not a valid JSX element type.
    Type '(props: PropsWithChildren<{ sdk: Auth; }>) => Element' is not assignable to type '(props: any) => ReactNode | Promise<ReactNode>'.
      Type 'Element' is not assignable to type 'ReactNode | Promise<ReactNode>'.

Expected behavior

It type checks against react 19.

devth avatar Jan 08 '25 13:01 devth