r/javascript • u/bogdanelcs • Jul 16 '26
I stopped destructuring everything
https://allthingssmitty.com/2026/07/13/i-stopped-destructuring-everything/
81
Upvotes
r/javascript • u/bogdanelcs • Jul 16 '26
View all comments
-2
u/Iggyhopper extensions/add-ons Jul 16 '26 edited Jul 16 '26
If you have a problem with naming variables the answer is not to get rid of deconstruction. The answer is to name your variables better.
You could have a prefix for variables that come from a deconstruction, aka
dTitleordcTitle.You could use
postTitleorpTitleinstead ofpost.title.There are a several ways to deal with the problem.