11.8 Generic Arrow Functions in TSX Files
Right, let’s talk about generic arrow functions in the wild west of TSX files. You’re going to write a lot of these, especially for React components and helper functions. And this is where TypeScript’s two syntaxes—one for the language and one for its type system—decide to have a bit of a scuffle. It’s not hard, but the first time your editor lights up with a red squiggly line, you’ll think you’ve broken the very fabric of reality. You haven’t. The designers just made a… questionable choice.