I am looking use PrimeReact Dropdown in NextJs app using typescript
When I select the list to get the dropdown options I get Error: Objects are not valid as a React child (found: object with keys {name, code})
The minimum code in a TSX file is
const catTypes = [
{ name: 'Brand', code: 'B' },
{ name: 'Category', code: 'C' },
{ name: 'Title', code: 'T' },
];
const [selectedCat, setSelectedCat] = useState<any>(null);
<Dropdown value={selectedCity1} options= {catTypes} />