My issue has already been discussed here. My case, however, is slightly different and I'm not sure how to resolve it.
type Filters = {
short: boolean;
long: boolean;
};
Then in my function:
const options = {short: false, long: true}
{Object.keys(options).map((option, i) => (
<Text>{options[option]}</Text>
...
I understand that TypeScript cannot use a string as a keyof an object. I tried using the solutions in the thread I mentioned, but I'm getting various errors. I am not quite sure how to use those solutions in my case of a loop. Any ideas?