Front end developer specialising in JavaScript and React. Experienced in all aspects of modern front end development. Passionate about making accessible, secure and performant software.
Yes, completely agree. After getting used to functional programming the redundancy of .then(d => something(d)); always sticks out to me as .then(something); is equivalent.
Sometimes I take it a step further and also shorten the res.json() line, although this one depends because sometimes it can be more confusing. For example:
import{invoker}from'ramda';fetch("...").then(invoker(0,'json'))// equivalent to (res => res.json())
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes, completely agree. After getting used to functional programming the redundancy of
.then(d => something(d));
always sticks out to me as.then(something);
is equivalent.It's as though someone was writing:
Instead of just:
Sometimes I take it a step further and also shorten the
res.json()
line, although this one depends because sometimes it can be more confusing. For example: