7 ms·
Unless you are working in a single process script, barrel file is almost unavoidable. A typical nodejs app will often be split in many packages, requiring barre
by h1fra 3y ago
Unless you are working in a single process script, barrel file is almost unavoidable. A typical nodejs app will often be split in many packages, requiring barrel file anyway.
- deleted 3y ago[deleted]
- agos 3y agoI've never really used barrel files, I don't see why they are unavoidable
- c-hendricks 3y agoAfter years of writing JS/TS apps, barrel files are absolutely avoidable. You just write your functions / classes / variables, and import them wherever needed. No intermediary step of re-exporting them is needed.