DEV Community

Discussion on: Whenever we see (d) => setData(d), what can we think about?

 
kennethlum profile image
Kenneth Lum

I guess that can make sense. When I first looked at some code that was like

fetch(" ... ")
  .then(res => res.json())
  .then(setData)
  .catch(console.error);
Enter fullscreen mode Exit fullscreen mode

I just thought it was kind of cool. I guess maybe just as something we are aware of.