Comment

Comment by maplant

This is pretty easy to understand if you have a cursory understanding of Rust and HTML.

I won't get into the HTML part (I think it's obvious), but the

  $(|_e| count.increment())
part is a rust closure. |_e| is the argument to the closure, which has a leading underscore because it's unused. I imagine it's some context about the event (thus the e). The rest is the body of the closure. It increments the count.

pretty simply

parent maplant 1 month ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton