News for hackers. Stuff that matters.
Re:Pipe Operator (|>) For JavaScript by captainmuon on Friday January 20, 2023 @08:53PM (#34462951)
But isn't then the problem that JS doesn't offer more expressive function contexts? Some languages like Nim allow you to use blocks in place of expressions; the last expression in the block determines the return value. You can also use `if` as an expression. No need to introduce a separate syntax for this case. (Although I do like piping in bash, but I don't think it is a good idea for JS.)

Also sometimes you should just give stuff a temporary name, and treat React like a templating language.

There are no comments on this comment yet.