banthagroup / fslightbox-react

Basic version of Fullscreen Lightbox for React.js. Website: https://fslightbox.com/react
MIT License
169 stars 23 forks source link

React 18 TS ReactNode typings issue #211

Open grzennio opened 2 years ago

grzennio commented 2 years ago

Error occured after upgrading packes with React v 18 "react": "18.1.0", "fslightbox-react": "1.6.2", Error: TS2786: 'FsLightbox' cannot be used as a JSX component. Its instance type 'FsLightbox' is not a valid JSX element. The types returned by 'render()' are incompatible between these types. Type 'import(".../node_modules/@types/react-dom/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'. Type '{}' is not assignable to type 'ReactNode'.

Issus related: https://github.com/microsoft/DefinitelyTyped-tools/issues/433