Похожие чаты

Hi, anyone use barrel files? im using this pattern lots of

time and in lots of projects

today i read some blogs about barrel files that they say barrel files damage performance of app

has anyone experience? shouid i refactor all projects? or not?

12 ответов

27 просмотров

whats a barrel file?

Ali- Автор вопроса
Richard | If you DM for support you PAY
whats a barrel file?

barrel files are index files that you import all files in a folder in that and import them from index like: // in functions directory // test.js const test = () => console.log("test") export default test // test2.js const test2 = () => console.log("test2") export default test2 // index.js import test from "./test" import test2 from "./test2" export { test, test2 } // in another directory // someFile.js import { test, test2 } from "./functions"

aren't imports resolved when you start an app, not during runtime (except lazy imports)?

Ali- Автор вопроса

Стикер

Ali- Автор вопроса

https://dev.to/tassiofront/barrel-files-and-why-you-should-stop-using-them-now-bc4 https://uglow.medium.com/burn-the-barrel-c282578f21b6 these blogs

Ali
https://dev.to/tassiofront/barrel-files-and-why-yo...

These blogs are one sided they are correct according to their own point of view in most cases I came across many blogs saying stop using div tags in react use react fragments instead of Some saying react is dead 💀 But still it leaves and remains the most popular frontend framework Soo if you have your own way of laying out components and its efficient and easy for you My advice is keep it just don’t write noodles code 🤣

Ali
https://dev.to/tassiofront/barrel-files-and-why-yo...

__BEFORE YOU KEEP READING: this article and its metrics were created thinking on final front-end applications. Those that final users navigate such as dev.to and my source project. So, if you have been using Barrel files in any other context, such as packages, it (Barrel files) might fit you as expected.__

Kudzai Munyama
These blogs are one sided they are correct accordi...

nah bro react ain't dead frontend is dead💀 *just joking{maybe}

Ali- Автор вопроса
Kudzai Munyama
These blogs are one sided they are correct accordi...

yeap, i think too but i believe it damages performance but for scaled applications that has lots of features and users i hope doesn't damage to my project

D
React is dead, long life Blazor

i am learning blazor. it's very good and like react but the way react work i prefer that. the only advantage of blazor is that you don't need learn javascript that's it.

Похожие вопросы

Обсуждают сегодня

Карта сайта