You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I used patch-package to patch react-native-video@6.0.0-beta.2 for the project I'm working on.
After the upgrade (from 5.2.1 to 6.0.0-beta.2), typing broke for accessibilityLabel of Video - even if it is actually taken into account in the test after!
Without the fix:
TS error= Property 'accessibilityLabel' does not exist on type 'IntrinsicAttributes & ReactVideoProps'
importVideo,{IgnoreSilentSwitchType,ReactVideoProps,ResizeMode}from'react-native-video';exportconstTF1Video=(props: ReactVideoProps)=>{return(<Videomuted={true}repeat={true}resizeMode={ResizeMode.COVER}rate={1.0}ignoreSilentSwitch={IgnoreSilentSwitchType.OBEY}accessibilityLabel="TF1video"// 🐞🐞 TS error= Property 'accessibilityLabel' does not exist on type 'IntrinsicAttributes & ReactVideoProps'{...props}/>);};
It was okay in previous version of lib (5.2.1).
It's only a TS issue, in my test screen.getByLabelText('TF1video') works! 👌
Great idea for the accessibility props, it will add everything @KrzysztofMoch! I'll do it soon 🙂
@freeboub I think accessibility label is a better standard than test ID, but I guess the last ones are still widely used, so yes we should add them to!
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-native-video@6.0.0-beta.2
for the project I'm working on.After the upgrade (from 5.2.1 to 6.0.0-beta.2), typing broke for accessibilityLabel of Video - even if it is actually taken into account in the test after!
Without the fix:
TS error= Property 'accessibilityLabel' does not exist on type 'IntrinsicAttributes & ReactVideoProps'
It was okay in previous version of lib (5.2.1).
It's only a TS issue, in my test
screen.getByLabelText('TF1video')
works! 👌With the fix
After adding it: TypeScript happy 😊
Here is the diff that solved my problem:
On the lib, it could / should probably be on the
types/video.ts
file?I may open a PR for it, if pertinent!
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: