react-native-template-typescript
react-native-template-typescript copied to clipboard
Typescript displays wrong messages.
Expected results
The snippet below is the code of the AssetsScreen.tsx
file.
import { Text, View } from 'react-native';
import React, { Component } from 'react';
export default class AssetsScreen extends Component {
render() {
return (
<View>
<Text>AssetsScreen</Text>
</View>
);
}
}
Expecting typescript does not display the error message "Operator '<' cannot be applied to the types 'View' and 'RegExp'".
But it's strange that some other components don't have the same problem.
Observed results
Steps to reproduce
-
npx react-native init rn_wallet --template react-native-template-typescript.
-
yarn start
-
yarn android
- Create a directory "src" in the root directory of the project.
- Create an "AssetsScreen.tsx" and write down the component code.
Environment
- windows 11
- node v16.13.1
- vscode 1.68.1
- react-native 0.69.1
- yarn 1.22.17