Issue using react-native-paper with typescript
See original GitHub issueAsk your Question
So I am trying react-native-paper for the first time. I am trying to test it out with a bootstrapped expo and typescript application but every time I declare a component I keep getting the following error:
Type '{ children: Element[]; }' is missing the following properties from type 'Pick<any, "style" | "children" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityLabel" | "accessibilityRole" | "accessibilityStates" | "accessibilityHint" | ... 41 more ... | "onTouchEndCapture">'
or similar errors like this:
Type '{ children: string; }' is missing the following properties from type 'Pick<any, "style" | "onLayout" | "testID" | "nativeID" | "accessible" | "accessibilityLabel" | "accessibilityRole" | "accessibilityStates" | "accessibilityHint" | "accessibilityComponentType" | ... 19 more ... | "textBreakStrategy">': style, onLayout, testID, nativeID, and 26 more.
Dependencies Versions:
"@types/react": "~16.9.0"
"@types/react-native": "~0.60.23"
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz"
"react-native-paper": "^3.4.0"
"expo": "36.0.0"
Any thoughts? Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (1 by maintainers)
Top GitHub Comments
@andordavoti just tried this and it fixed for me: https://brucelefebvre.com/blog/2019/11/26/typescript-react-native-paper/
i had a similar issue but tried npm install npm audit fix
and then it started to work, i guess give it a go as there maybe libs not in sync etc.