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?
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)?
no, all things are ok just performance issue
Стикер
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
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 🤣
__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.__
nah bro react ain't dead frontend is dead💀 *just joking{maybe}
React is dead, long life Blazor
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
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.
Обсуждают сегодня