score:0

I figured it out. Apparently starting since v6, the arrow function solutions provided in the link above is no longer possible, according to this discussion

So now the current solution would be:

.on("mouseover", (d) => {
    d3.select(d.currentTarget)
      .attr("fill", "red");
})

Related Query

More Query from same tag