Comment

Comment by anewaccountname

Python already has a solution for callbacks:

    @reg_callback(button.onclick)
    def callback():
        do_stuff()

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton