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

every first react-native component gets typescript error like this:

$
0
0

when I use this Text component of react-native, I get this error:

No overload matches this call.Overload 1 of 2, '(props: TextProps | Readonly): Text', gave the following error.Type '{ children: string; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.Overload 2 of 2, '(props: TextProps, context: any): Text', gave the following error.Type '{ children: string; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.ts(2769)

my code:

import {Text} from 'react-native'...<Text>123</Text>

Viewing all articles
Browse latest Browse all 6287

Trending Articles