I am trying to learn to use react and typescript. However, I am really stuck here.
I am trying to build a counter in the app based on the number of clicks a button gets which is a material ui tooltip. I am not getting how to marry them together(the ui and the logic). So far my code looks like this:
import React,{useState} from 'react';import Tooltip from "@material-ui/core/Tooltip";export const MyCard = () => {const classes = useStyles();return (<Card className={classes.root}><Tooltip title={"Like"}><IconButton aria-label="Like Me"><FavoriteIcon /></IconButton></Tooltip></Card>);
However, I am not sure how to build a counter for the like button based on the number of clicks.Any guidance here would be useful.
Thanks!