TypeScript poll: Which approach to declaring React prop types do you prefer


TypeScript poll: Which approach to declaring React prop types do you prefer?

Poll in next tweet...👇

Poll: Which approach to declaring React prop types do you prefer?
My take? I prefer separate types.

1. Easier to read since they're not surrounded by other syntax.
2. Named, so it's clear what the code does
3. Keeps the types nearby, but "out of the way". I can reference them, but they don't add noise to the component's signature.

View original on X