0
0
KKKhalid Khan
Above code creates an export interface called AppProps for use by other code. The filename.extComponent class extends React.Component and takes as its props the AppProps interface. The class contains a render function that returns an HTML view with a Text component.
Library: react-native
Shortcut: reactnative.componentwithprops
import * as React from 'react';
import { View, StyleSheet, Text } from 'react-native';
export interface AppProps {
}
export default class filename.extComponent extends React.Component<filename.extProps, any> {
constructor(props: filename.extProps) {
super(props);
}
public render() {
return (
<View>
<Text>filename.ext Component</Text>
</View>
);
}
}