5 ms·
If I keep it vague I can do things like: let { type } = customer; type = “premium”; setCustomer({ type }); It’s only slightly more verbose if I
by LowTechHN 27d ago
If I keep it vague I can do things like:
let { type } = customer;
type = “premium”;
setCustomer({ type });
It’s only slightly more verbose if I named the variable:
customerType
In many cases, the data I’m dealing with is outside my name control and commonly has something like { type } (e.g. <input />)