tjallingt/react-youtube

Type 'string' is not assignable to type 'undefined' on `loading` attribute

Closed this issue ยท 2 comments

I'm getting this error when using loading="lazy"

 error TS2322: Type 'string' is not assignable to type 'undefined'.

28           loading='lazy'
             ~~~~~~~

  node_modules/react-youtube/dist/YouTube.d.ts:43:5
    43     loading?: React.IframeHTMLAttributes<HTMLIFrameElement>['loading'];
           ~~~~~~~
    The expected type comes from property 'loading' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<YouTube> & Pick<Pick<Readonly<YouTubeProps>, "id" | ... 13 more ... | "onPlaybackQualityChange"> & Pick<...> & Pick<...>, never> & InexactPartial<...> & InexactPartial<...>'

The error seems caused by:

๐ŸŽ‰ This issue has been resolved in version react-youtube-v8.3.0-canary.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

๐ŸŽ‰ This issue has been resolved in version react-youtube-v8.3.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€