Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support React 19 #809

Open
janie314 opened this issue Dec 22, 2024 · 1 comment
Open

Support React 19 #809

janie314 opened this issue Dec 22, 2024 · 1 comment

Comments

@janie314
Copy link

Steps to reproduce the behavior:

  1. Use ImageGallery with a React 19 repo.
  2. You'll get an error like the following, and see that it can be fixed by downgrading to React 18.
src/App.tsx:36:8 - error TS2786: 'ImageGallery' cannot be used as a JSX component.
  Its type 'typeof ReactImageGallery' is not a valid JSX element type.
    Type 'typeof ReactImageGallery' is not assignable to type 'new (props: any) => Component<any, any, any>'.
      Construct signature return types 'ReactImageGallery' and 'Component<any, any, any>' are incompatible.
        The types returned by 'render()' are incompatible between these types.
          Type 'import("/home/janie/git/janie.page/photo-gallery/node_modules/@types/react-image-gallery/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'.
            Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
              Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.

36       <ImageGallery items={images} slideInterval={10000} showNav={false} />
@janie314
Copy link
Author

This is likely just #801 in a different form, based on how I'm using React 19.

This project may just be able to support React 19 as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant