This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-14
Channels
- # aleph (2)
- # atlanta-clojurians (5)
- # beginners (38)
- # boot (2)
- # bristol-clojurians (1)
- # cider (31)
- # clara (8)
- # cljs-dev (136)
- # cljsrn (4)
- # clojure (86)
- # clojure-china (1)
- # clojure-greece (1)
- # clojure-italy (24)
- # clojure-nl (1)
- # clojure-spec (21)
- # clojure-uk (19)
- # clojurescript (68)
- # community-development (28)
- # core-async (35)
- # core-logic (4)
- # cursive (1)
- # data-science (1)
- # datascript (1)
- # datomic (46)
- # events (1)
- # figwheel (6)
- # fulcro (11)
- # graphql (3)
- # hoplon (1)
- # jobs (6)
- # jobs-discuss (94)
- # keechma (3)
- # luminus (4)
- # lumo (7)
- # mount (6)
- # off-topic (24)
- # onyx (6)
- # parinfer (31)
- # portkey (3)
- # programming-beginners (16)
- # re-frame (20)
- # reagent (69)
- # remote-jobs (4)
- # ring-swagger (25)
- # schema (1)
- # shadow-cljs (151)
- # spacemacs (2)
- # sql (14)
- # tools-deps (16)
- # uncomplicate (5)
- # unrepl (35)
- # vim (1)
- # yada (72)
I'm seeing some weird behavior now: I register using (events/listen ...)
and after I reload the browser window, this event handler is not called. If I make a change to the core.cljs
file in atom, save and then watch the auto-reload websocket reload the page, after that, the key-handler is called. I'm such a newb with this tech, I don't even know where to start investigating. Does this sound familiar?
@pieterbreed I think I know what you’re talking about, I’ve had bugs in the past due to load order. If you can share your code, we can take a look
ok sure, give me a second... pvt msg ok?
in here is best
Hi there! I need some clarification here since it is the first time I am writing a type-3 component in reagent. Can someone tell me, if I need an update-function like here: https://reactjs.org/docs/react-component.html#updating ???
@timok you don't need anything apart from :reagent-render
... note that it's :reagent-render
and not :render
@mccraigmccraig thanks! then I will search for my mistake somewhere else...;)
@timok Make sure you didn't fall to "rookie mistake" described here: https://github.com/reagent-project/reagent/blob/master/docs/CreatingReagentComponents.md#form-2--a-function-returning-a-function
@p-himik beat me to it… ( https://github.com/reagent-project/reagent/blob/master/docs/CreatingReagentComponents.md#form-3-a-class-with-life-cycle-methods )
haha, i was just looking for that too @p-himik @escherize - it should be pinned
@p-himik @escherize @mccraigmccraig got that! Read it multiple times ;)
@timok if you are using leaflet (or other non-react components) then you will need :component-did-mount
and also :component-did-update
- you can update the leaflet map in :component-did-update
@timok the first thing that jumps out to me is that map-page
is wrong.
Just remove the (fn []
on line 60 (turning it from a form-2
into a form-1
)
(along with the matching closing parens on line 81)
You can't have a @
on a subscribe OUTSIDE of the renderer itself
So either:
1. Do as I suggested above and remove the fn
so the whole thingis the renderer
2. Remove the @
from where they are and change each *use* of, for example, open-tours
to be @open-tours
Thanks @mccraigmccraig @mikethompson. will try that tomorrow!