SetState TypeScript Typ
//Change string for the desired type
React.Dispatch<React.SetStateAction<string>>
Exuberant Eland
//Change string for the desired type
React.Dispatch<React.SetStateAction<string>>
//just define function with below
setValue : React.Dispatch<React.SetStateAction<string>>
//example for boolean
const ListsComponents: React.FC<{ setOpen?: React.Dispatch<React.SetStateAction<boolean>> }> = ({ setOpen }) => {
const [currentSection, setCurrentSection] = useState<'home' | 'mint' | 'myNft' | 'roadmap'>('home');
return (
<div> Just demo<div/>
)