News for hackers. Stuff that matters.
Re:Understanding JavaScript Objects by kevin_thibedeau on Friday July 27, 2018 @04:24PM (#17629036)
The problem is that in the latter case the function object doesn't know what it's name is. This pattern gets unnecessarily abused just to be cool or follow the cargo cult.
Re:Understanding JavaScript Objects by crooked-v on Saturday July 28, 2018 @10:21PM (#17636155)
React adopted displayName to avoid "the function object doesn't know its name" issues, as well as names being mangled by minifiers (or, in the future, stuff like WASM).