SVG vs TSX in React: Finding Optimal Graphics ControlSVG vs TSX in React: Finding Optimal Graphics Control
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Faced SVG issues in Expo, switched to .tsx for better control. I Don't think SVG files have any advantage over .tsx in React projects. What do you prefer and why?

2 voted

67%

.tsx File

1 voted

33%

.svg File

3 votes

Closed

Abhiram's avatar
I usually prefer .tsx when I need dynamic props, theming, or animation control. Raw SVGs are great for static assets, but once behavior or state enters the picture, components feel more maintainable. Curious how you’re handling performance trade-offs in larger icon sets?
Haris 's avatar
I do spoil myself a bit by creating too many svg based tsx files as I think performance trade-offs are negligible in bundled js. But for larger sets I use CDNs to host svgs. My goto CDN is imagekit.io
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started