using es6 set in typescript code example Example: using es6 set in typescript const [elements, setElements] = useState<Set<string>>(new Set())