I want to make a reusable component in react-native using typescript.Most of the time I use this way as a simple react-native project. This time I want to use TypeScript instead of JavaScript. how can I do it?
import React from 'react'import { Text, StyleSheet, Platform } from 'react-native'import { RFValue } from "react-native-responsive-fontsize";const AppText = ({ children, style } ) => { return (<Text style={[styles.textcommon, style]} > {children} </Text> )}const styles = StyleSheet.create({ textcommon: { fontSize: RFValue(18), alignSelf: 'center', color: '#fff', fontFamily: Platform.OS === 'android' ? 'Roboto-Light' : 'Avenir', }})export default AppText;