logoalt Hacker News

LowTechHNyesterday at 11:45 PM0 repliesview on HN

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 />)