This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-02
Channels
- # aws-lambda (1)
- # beginners (46)
- # boot (190)
- # cider (12)
- # clara (6)
- # cljs-dev (9)
- # cljsjs (8)
- # clojure (152)
- # clojure-austin (3)
- # clojure-berlin (3)
- # clojure-finland (2)
- # clojure-france (5)
- # clojure-italy (3)
- # clojure-russia (92)
- # clojure-serbia (4)
- # clojure-spec (7)
- # clojure-uk (190)
- # clojurescript (115)
- # cursive (20)
- # datomic (20)
- # dirac (4)
- # emacs (9)
- # gsoc (5)
- # hoplon (1)
- # jobs (1)
- # klipse (4)
- # lein-figwheel (1)
- # leiningen (6)
- # lumo (2)
- # mount (18)
- # off-topic (57)
- # om (68)
- # om-next (14)
- # onyx (33)
- # perun (32)
- # portland-or (4)
- # re-frame (21)
- # reagent (85)
- # ring (6)
- # ring-swagger (23)
- # schema (1)
- # uncomplicate (1)
- # untangled (13)
- # vim (7)
Depends entirely on what else you include
@danielcompton a good start is to test https://github.com/Day8/re-frame-template. last time I compiled it was around 500K, not gzipped
I don't have time at the moment, but happy to hear reports back of gzipped and not gzipped
1.9.456 was recently released at 28-Jan-2017. I assume it includes the compiler changes. sadly, seems that we are using all the codes of react that the compiler couldn’t help much 😞
@rui.yang, check https://gist.github.com/swannodette/4fc9ccc13f62c66456daf19c47692799
hi, hopefully I'm not here to spam, but I do have a question / problem as which feels a bit rude as the first thing I say... but anyway - here goes I'm developing a re-frame app using figwheel as part of my dev process, which had been working great until I started using reg-sub-raw for subscribing to a REST api (aiming to be in accordance with https://github.com/Day8/re-frame/blob/master/docs/Subscribing-To-External-Data.md) The problem I'm seeing is that after a figwheel reload of my subs.cljs file those subscriptions go mental, they seem to get into some sort of infinite loop and make http requests as fast as they can until the browser eventually gives up the ghost. Sticking some printlns and tweaking them figwheel hot reloads I can see that the new subs handlers are being loaded as the message being printed updates and the old message doesn't get repeated, so they're not being added to. If I remove the (ra/render ...) from the function figwheel calls on reload it doesn't occur, but obviously the ui doesn't re-render so that's no use. I've googled everything I can think of and I'm well and truly baffled, so I thought I'd ask in here. Though I understand this is a bit of an obscure problem so I don't necessarily expect anyone to have an idea! 🙂
(also worth noting when figwheel reloads files other than the subs file, e.g. one of my ui view cljs files, then this issue doesn't occur)
Hi @murphybob ! I encountered a similar situation, note that it wasn't triggered by figwheel reload, but by clojure.spec. The thing is that after hours of searching the bug, I discovered that … it wasn't a bug (nor it was a feature 🙂 ). I was writing type 2 and 3 components like those ones:
(defn my-cmpt-type-2 []
(let [s (subscribe [:some-sub)]
(fn []
…)))
(defn my-cmpt-type-3 []
(let [s (subscribe [:some-sub])]
(reagent/create-class
{:component-did-mount (fn []……)
:reagent-render (fn [] ……)})))
And I was using my specs to generate sample data in forms. In other words I was filling html forms automatically with random data. I generated these data inside the render
function, and guess what… this data change was triggering some dispatch calls and thus some handlers, that in turn were swap!ing the database and triggering subscriptions … I think you can see the loop…
So when I saw you post I asked myself : Why is he using reg-sub-raw rather than a simple reg-sub? Is there some particular state somewhere else than the main database that could alter something? What does the function called by figwheel on refresh ?
I'm afraid I don't have an answer to you problem, but maybe the problem is not with the subscriptions themselves …
And maybe the debug
interceptor could help tracing if some event is being dispatched …
https://github.com/Day8/re-frame/blob/master/docs/Interceptors.md#appendix