This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-14
Channels
- # aleph (16)
- # bangalore-clj (4)
- # beginners (19)
- # boot (27)
- # cider (81)
- # clara (2)
- # cljs-dev (343)
- # cljsrn (97)
- # clojure (224)
- # clojure-hk (1)
- # clojure-italy (25)
- # clojure-russia (5)
- # clojure-serbia (2)
- # clojure-spec (7)
- # clojure-uk (27)
- # clojurescript (97)
- # cursive (8)
- # datomic (48)
- # docker (1)
- # emacs (15)
- # hoplon (39)
- # jobs (4)
- # lumo (13)
- # off-topic (2)
- # om (66)
- # onyx (7)
- # parinfer (5)
- # pedestal (2)
- # play-clj (10)
- # protorepl (2)
- # quil (1)
- # re-frame (38)
- # reagent (33)
- # spacemacs (1)
- # specter (4)
- # sql (19)
- # test-check (31)
- # unrepl (4)
- # untangled (3)
It is a real delight for me to see a steady trickle of job descriptions mentioning re-frame. Here are two current ones: http://workinstartups.com/job-board/job/59443/senior-clojure-engineer-at-entrepreneur-first/ https://angel.co/compute-software-2/jobs/255910-clojure-clojurescript-engineer Knowing re-frame might actually help you to get a nice job these days!!
I have just bashed out a quick update to the testing doc: https://github.com/Day8/re-frame/blob/master/docs/Testing.md It probably contains typos. Any extra eyes on it, with fixes would be appreciated.
A new perspective (a new part of MentalModelOmnibus): https://github.com/Day8/re-frame/blob/master/docs/MentalModelOmnibus.md#dsls-and-vms
another job description with re-frame for your fridge @mikethompson https://www.yapster.info/jobs-developer from my company š (though we already filled this position)
I often get warnings like this when using re-frame on react-native: <Warning>: 're-frame: overwriting', ':event', 'handler for:'
after reloading with figwheel. Am I doing things wrong, or is that normal?
hm looks like a common issue: https://github.com/Day8/re-frame/issues/204
it's more obvious on react-native because console.warn
triggers a very loud Yellow Box on the bottom of the screen
Yeah, when figwheel reloads the file, all the registrations in that file are redone. But re-frame can't be sure if reregistering a handler is a bug or not
so the case you want to catch is where there are multiple event handlers for the same key, perhaps in different namespaces?
indeed
@danielcompton did get someway towards a solution. https://github.com/Day8/re-frame/pull/254 Can't remember why we left it.
@mikethompson I see, thanks
How do I fire an event on "load complete"? I want to focus the main input field when the browser is ready.
"When the component is rendered": https://facebook.github.io/react/docs/refs-and-the-dom.html "When the page finishes to load" window.onload = (e) => {}
lein ancient
tells me that reagent 0.7.0 is available (I am using 0.6.2). Is that compatible with re-frame 0.9.4 ?
@mbertheau maybe using the autofocus
attribute would help? https://www.w3schools.com/tags/att_input_autofocus.asp
Hmm, I can't get the autofocus attribute in the HTML. [:input {:auto-focus true :type "text"}}
doesn't do it - that just renders as <input type="text">
.
in html it is expected that autofocus does not have a value. But in xhtml standard it should have the value "autofocus", so maybe you try {:autofocus "autofocus" :type "text"}
Ah. I was expecting the autofocus attribute to appear in the HTML, but actually React handles it, and :auto-focus true
works fine.
@mbertheau was that reply to me?
@pesterhazy I was looking for better hooks into figwheel for this https://github.com/bhauman/lein-figwheel/issues/485
But it didnāt go too far
anyone have experience pushing reframe /cljs in general really hard? like .. how abusive can you be about reactive flowing data before you start to miss frames?
thatās good to hear. I guess I will find out how well reframe does. iām essentially doing a O(n^2 * 4)
every time thereās a change in any of 4 collections
but the implementation of the brute-force approach is about 4x less complex than any other way I can think of š
iām wondering if I could do a ātrue frpā approach with this feature iām developing.. where I have two sets of base data, and two sets of āstateful dataā that I apply on top each time any of the 4 sets change
If I'm understanding correctly, you can use Reagent's track
to merge base- and state- data and have it look like a ratom:
(defn combined-data
[]
(let [base @(rf/subscribe [:base-data])
state @(rf/subscribe [:stateful-data])]
(merge base state)))
...
(let [combined (r/track combined-data)] ...)
in which combined
is a ratom with the merged data.