This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-19
Channels
- # admin-announcements (1)
- # adventofcode (14)
- # announcements (2)
- # asami (7)
- # babashka (9)
- # beginners (41)
- # calva (43)
- # cider (31)
- # clerk (2)
- # clojure (34)
- # clojure-europe (17)
- # clojure-nl (1)
- # clojure-norway (166)
- # clojure-uk (7)
- # clojurescript (4)
- # datomic (1)
- # fulcro (10)
- # garden (1)
- # hoplon (2)
- # humbleui (4)
- # hyperfiddle (12)
- # jobs-discuss (6)
- # quil (6)
- # ring (6)
- # shadow-cljs (55)
- # squint (8)
- # xtdb (26)
Hi, does anyone know a good intro / documentation for handling mouse events with re-frame + reagent? Specifically on a canvas component. I'm quite new to it, and do not know react. Thanks!
I doubt you can find a good doc on such a specific subject.
That being said, if you split the problem into its constituents, it becomes trivial to research:
1. How to handle mouse events on a canvas in JS
2. How to work with mouse events in React
3. How to translate React code to Reagent
I haven't checked so might potentially be wrong somewhere, but as an example for a mouse click:
1. Probably by handling the click
event on the canvas DOM node
2. Probably via the onClick
property passed to
3. Certainly by using
:on-click
or :onClick
as a property for [:canvas ...]
.