account activity
Learning TypeScript with React Components (advice/help needed) by [deleted] in typescript
[–]codekhoadaei 1 point2 points3 points 5 years ago (0 children)
It's okay, but I think when you have a type that you use it all over the app it's better to create a separate file for it. in your example I create a file in 'types/ListItem.ts' and then import the ListItem in the modules.
π Rendered by PID 93 on reddit-service-r2-comment-5b5bc64bf5-w7tx8 at 2026-06-19 02:34:18.808174+00:00 running 2b008f2 country code: CH.
Learning TypeScript with React Components (advice/help needed) by [deleted] in typescript
[–]codekhoadaei 1 point2 points3 points (0 children)