Похожие чаты

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 ответов

13 просмотров

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.

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

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

анрей С какой целью зашёл?
КТ315
35
я часов 15 назад начал пытаться написать хоть что-то напоминающее ос и у меня есть проблема, которую я пытаюсь решить последние часов 5: есть крч 2 исходника с минимальным код...
Al1to
13
Я не очень много работал с потоками, тут возник вопрос - если будет одновременный доступ к памяти из двух разных потоков, это само по себе приведет к ошибке?
The Bird of Hermes
25
Hey @AgentPhalaNetworkBot How many active members are there in this group?
Rahul Sultania
18
а вот интересный вопрос появляется: допустим у нас есть приложение с системой модулей. Будет ли считаться система модуль+прога ассемблерной программой если: а) Прога на Си, м...
Mixail Frolov
29
Foundation controler protected async Task<IActionResult> ExecuteActionAsync<T>(Func<Task<(int statusCode, T result, string message)>> action, string methodName) { var sto...
Jass
6
Друзья всем привет, хочу познакомится с гентой, но пока разнюхиваю обстановку извне. Можете поделится своим опыт насчет поведения генты после обновления всей системы, падала л...
Kupr
18
Yooo, Guys! 🤩 Did you see the latest FunToken stats? We're on fire! 🔥
SpaceGemz
33
Привет. Почему может RabbitMQ через эндпойнт :15692/metrics/detailed?family=queue_metrics не выдавать метрик по конкретной очереди (выдавать нули)? кластер кроля в кубере сост...
Vlad
4
Падает сервис в одной из 100500 инсталляций. По крашрепорту - на System.InitUnits, пересмотрел секции инициализации - ничего криминального не нашел. Модулей - сотни... как бы ...
Михаил Усков
9
Карта сайта