Fork me on GitHub
#re-frame
<
2017-04-29
>
eveko11:04:11

I have found myself in the perculiar situation that as I am reloading my source through fighewheel , that i get duplicate app states ( #<Atom: {:db {:db{:db....) then subscriptions are all over the place. Elements that should be subscribed to the same thing are not... Does this have to do with having multiple UI components subscribing to the same thing?

curlyfry13:04:42

@eveko Subscriptions shouldn't mutate the app-db, so they are unlikely to be the culprit. Sounds more like your state is being updated in some weird way in one of your event handlers

eveko14:04:39

I use Ajax calls reset maps of data from my java backend

eveko14:04:18

so I noticed that the db duplicates it self when ever I load the panel that presents user data...

curlyfry18:04:04

@eveko Hmmm, I don't see anything particularly strange with that code...

eveko18:04:52

But duplication happens in combination with hot reload from figwheel... say i change a div or something

gamecubate21:04:35

@eveko I am not familiar (yet) with the :http-xhrio effect but shouldn’t its associated map’s :on-success kv include the actual response, e.g.,

:on-success      [:process-response %]
?

gamecubate22:04:25

(that was a side note; I have no idea whether or not this has relevance to your reported problem)