question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue using react-native-paper with typescript

See original GitHub issue

Ask 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:closed
  • Created 4 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
antoniocapelocommented, May 25, 2020
1reaction
andrewdeakinscommented, Jan 26, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript Error with React native Paper Components. #1971
Hi! I think I found a temporary solution to this issue. ... "@types/react-native": "^0.66.1", in the devDependencies. Trying to match that version ...
Read more >
All react-native-paper components throw type error regarding ...
This seems to be an issue with @types/react-native or react-native-paper, there are open issues for this problem on react-native-paper ...
Read more >
props of "react-native-paper" are not completed/resolved
React Native: props of "react-native-paper" are not completed/resolved ... As they say: They are generated by typescript compiler. Nothing unusual about them.
Read more >
react-native-paper-dates - npm
Start using react-native-paper-dates in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type declarations.
Read more >
React Native Paper
React Native Paper is a high-quality, standard-compliant Material Design library that has you covered in all major use-cases. Learn more. Docs. Try out ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found