Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Cannot use module in TS, Newbie Here

$
0
0

So I've been trying to build web application with React Native and Typescript but I can't add button. I can add the button in component and then use it in my tsx, but when I try to add this button from github, https://github.com/rcaferati/react-native-really-awesome-buttonWhen I try to add this button to my code I get this error in TS.

import AwesomeButtonRick from "react-native-really-awesome-button";function Button() {  return <AwesomeButtonRick>Text</AwesomeButtonRick>;}

Also It doesn't matter if I use AwesomeButton or AwesomeButtonRick.

'AwesomeButtonRick' cannot be used as a JSX component. Its instancetype 'AwesomeButton' is not a valid JSX element.Type 'AwesomeButton' is missing the following properties from type 'ElementClass': render, context, setState, forceUpdate, and 3more.ts(2786)

I tried updating the dependecies and everything, can you show me what is it that I am doing wrong.


Viewing all articles
Browse latest Browse all 6287

Trending Articles