Hacker News new | ask | show | jobs
by josevalerio 1221 days ago
Like many of you I was very skeptical of this at first but it truly is amazing. An example today came from having many time stamps throughout the week, grouped by days, in a FE react project where each grouping has a property “isInThePast”.

I wanted to show a label for days that were in the past, and with the simple beginning of a ternary statement of “{grouping.isInThePast ? “} it auto completed the <span> tag with “(Past)” in red text using our UI library.

Examples like this happen all the time, and it saves you those two seconds dozens or hundreds of times per day. Just my 2c