react hook map to array typescript code example Example: useStae with array of strings typescript const [devices, setDevices] = useState<string[]>([])