This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-21
Channels
- # announcements (1)
- # babashka (13)
- # beginners (85)
- # calva (1)
- # chlorine-clover (16)
- # cider (30)
- # clj-kondo (2)
- # clj-on-windows (5)
- # cljdoc (3)
- # cljs-dev (12)
- # cljsrn (19)
- # clojure (88)
- # clojure-europe (39)
- # clojure-nl (7)
- # clojure-sweden (3)
- # clojure-uk (8)
- # clojurescript (35)
- # core-async (3)
- # data-science (2)
- # datomic (17)
- # defnpodcast (3)
- # deps-new (1)
- # editors (18)
- # emacs (4)
- # events (1)
- # expound (1)
- # figwheel-main (8)
- # fulcro (9)
- # graalvm (2)
- # graalvm-mobile (11)
- # helix (44)
- # jobs (7)
- # lsp (95)
- # luminus (9)
- # malli (6)
- # meander (4)
- # membrane (2)
- # missionary (13)
- # off-topic (98)
- # pathom (2)
- # polylith (4)
- # portal (3)
- # re-frame (6)
- # reagent (27)
- # reitit (3)
- # releases (3)
- # remote-jobs (6)
- # rewrite-clj (1)
- # rum (2)
- # sci (3)
- # shadow-cljs (7)
- # sql (66)
- # tools-deps (80)
- # vim (5)
- # xtdb (3)
Hey hey rummers. Question for ya.
(rum/defc feedback-widget < rum/reactive []
[:div#input-phorm
[:input {:id "ifeedback"
:value (rum/react feedback-input)
:on-change (fn [e]
(reset! feedback-input (.. e -target -value))
(.log js/console @feedback-input))}
]])
I want to make a feedback widget to live on every page...
If I use the line (.log js/console @feedback-input)
there are no problems
If I try and replace that line with (.log js/console (rum/react feedback-input))
there are problems, namely an error that says
Uncaught Error: Assert failed: rum.core/react is only supported in conjunction with rum.core/reactive
*reactions*
at Object.rum$core$react [as react] (core.cljs:396)
at onChange (app.cljs:64)
at HTMLUnknownElement.callCallback (react-dom.development.js:3946)
at Object.invokeGuardedCallbackImpl (react-dom.development.js:3995)
at invokeGuardedCallback (react-dom.development.js:4057)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4071)
at executeDispatch (react-dom.development.js:8244)
at processDispatchQueue (react-dom.development.js:8276)
at eval (react-dom.development.js:8300)
at eval (react-dom.development.js:22397)
So.... what am I doing wrong