TypeScript और React में "JSX element type '...' does not have any construct or call signatures" त्रुटि
सभी को नमस्ते! मैं TypeScript और React में नया हूँ, और कई घंटों से इस त्रुटि से जूझ रहा हूँ। मैं एक सरल component लिख रहा हूँ जो उपयोगकर्ताओं की सूची प्रस्तुत करेगा, लेकिन TypeScript त्रुटि दे रहा है।
यहाँ मेरा कोड है:
```tsx
// UserList.tsx
import React from 'react';
interface User {
id: number;
name: string;
}
const UserItem: React.FC = ({ name }) => {
return {name} ;
};
// Component जो users array लेता है
function UserList({ users }: { users: User[] }) {
return (
-
{users.map(user => (