This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-10
Channels
- # beginners (40)
- # boot (307)
- # boulder-clojurians (2)
- # carry (3)
- # cljs-dev (3)
- # cljsjs (16)
- # clojure (42)
- # clojure-greece (3)
- # clojure-russia (10)
- # clojure-uk (3)
- # clojurescript (116)
- # community-development (1)
- # component (5)
- # conf-proposals (2)
- # core-async (1)
- # crypto (2)
- # cursive (3)
- # devcards (1)
- # events (1)
- # hoplon (123)
- # om (28)
- # onyx (17)
- # pedestal (3)
- # proton (1)
- # re-frame (18)
- # reagent (26)
@rui.yang m
in main-page
either needs to be a reagent.ratom/reaction
or you should just use model
as the input to form-input
if you put debug statements on the value of @m
and @model
inside main-page
render you’ll see model
is indeed incrementing, but that won’t cause m
to change. m
is statically assigned the initial value of the model
atom - it’s not linked reactively
also, when i’m making components with internal state atoms, i usually operate on the internal state atom & then “publish” to the outside world via callback
(pattern copied from re-com)
also, i’m assuming the above (atom)
’s are reagent.core/atom
not regular cljs.core/atom
?
note there’s a #reagent channel dedicated to reagent/react questions
nvm i see you found it
@rorydouglas thanks for answering. I spent some time to debug step by step. and yes I missed reaction part
also I figured out that inside reaction, I must deref the previous signal (atom), otherwise it won’t work
@mikethompson regarding the figured it out in debounce
interceptor above, I see this won’t work because it’s not possible to re-route messages in an interceptor. The final handler is determined up-front by the initial event-id in reframe.events/handle
& can’t be changed afterwardsthrottle
interceptor below
also thanks for the double posting remindering. I double posted because I wasn’t sure which channel I should ask, whether it is reagent related or actually re-frame question.
i guess the approach then @m9dfukc would be to debounce in regular cljs prior to dispatching the event
@rui.yang oh not a problem 🙂 i know it’s unclear when it comes to re-com related questions where it makes sense to post
@m9dfukc i guess a dispatch-debounce
helper fn would actually fit in nicely alongside dispatch-sync
etc - controlling the behavior from the call-site directly
ah the correct way to terminate event processing is to modify the context :queue
and what i’m doing is throttling not debouncing. after all this, seems it probably is something better handled prior to dispatch, but if you need it @m9dfukc
i removed the other junk from yesterday since it was incorrectly named & mainly a conversation with myself