Fork me on GitHub
#re-frame
<
2018-03-14
>
pieterbreed06:03:36

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?

danielcompton07:03:42

@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

pieterbreed07:03:41

ok sure, give me a second... pvt msg ok?

danielcompton07:03:05

in here is best

timo16:03:04

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 ???

timo16:03:54

My component does not update when it should

mccraigmccraig16:03:35

@timok you don't need anything apart from :reagent-render ... note that it's :reagent-render and not :render

timo16:03:20

@mccraigmccraig thanks! then I will search for my mistake somewhere else...;)

mccraigmccraig16:03:22

haha, i was just looking for that too @p-himik @escherize - it should be pinned

timo16:03:26

@p-himik @escherize @mccraigmccraig got that! Read it multiple times ;)

mccraigmccraig18:03:54

@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

mikethompson19:03:39

@timok the first thing that jumps out to me is that map-page is wrong.

mikethompson19:03:16

Just remove the (fn [] on line 60 (turning it from a form-2 into a form-1)

mikethompson19:03:32

(along with the matching closing parens on line 81)

mikethompson19:03:15

You can't have a @ on a subscribe OUTSIDE of the renderer itself

mikethompson19:03:42

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

timo20:03:16

Thanks @mccraigmccraig @mikethompson. will try that tomorrow!