Context: I could have easily made it under 100 lines, but the 1000 lines for a dropdown is actually more easily managed, I learned the lesson of life,
"Somethings are better off being a Spaghetti "
I just love When devs are showcasing code. There’s jackpot for “I haven’t optimized the code” every time 😂
hahaha, true
I know shadcn when I see it
We are alike, infact any component with Content will be shadcn forsure,
If your solution for making it under 100 would have been pulling out a bunch of single-use components then my personal preference would also be to keep it at 1000.
Single-use components have their uses (you definitely need some e.g for distinct pages) but they feel way overused and often lead to a ton of unnecessary prop drilling.
EXACTLY! my friend
Plus it would have increased the data layers by making abstractions, and since it has a bunch of functions which are only used once like language switcher (i am not using it anywhere because dropdown is visible on all pages) then there is no need for making different files.
I wouldn't try to make a bunch of single use components but maybe try to use a loop create the dropdown items, and an array of items with things like label, icon, state and command function for action.
The dropdowns in my current system aren't that big and I am already thing about doing this.
This is why I have a 6k line component