As a frontend developer working with TypeScript, you’ve likely used generics to write reusable and type-safe functions. But when switching between arrow functions and normal function declarations, there’s a tiny syntax quirk that trips up many devs—especially in .tsx
files.
Let’s break it down 👇
✅ Using Generics in a Normal Function
💡 What’s with the Comma?
If you’re working in a .tsx
file, the following will throw a syntax error: