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

Is there a way to combine classes and interface props in typescript?

$
0
0

I'd like to use componentDidMount(), but I have a const with a interface prop. Is there a way to do this in typescript?

interface DataCardProps {  onPress: () => void;}const Covid19DataCard = ({ onPress }: DataCardProps) => {
export default class Covid19DataCard extends React.Component {  componentDidMount()}

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>