Fork me on GitHub
#re-frame
<
2016-08-06
>
fasiha00:08:05

@escherize: wewt, thanks, onBlur is a hack I can live with! I just have to avoid setting the <input>’s :value, and just replace onChange with onBlur. Will look forward to unexpected user-reported bugs from that 😛

johanatan01:08:41

^{:key "blah"} on an h-box doesn't seem to be working

johanatan01:08:50

Anybody have ideas on why that would be?

johanatan01:08:23

@shader: per the re-frame doc, r-atom is really a signal i.e., a value that changes over time, i.e., a stream.

From a ClojureScript perspective, the purpose of an atom is to hold mutable data. From a re-frame perspective, we'll tweak that paradigm slightly and view a ratom as having a value that changes over time. 

johanatan03:08:45

So, in FRP-ish terms, a reaction will produce a "stream" of values over time (it is a Signal), accessible via the ratom it returns.

johanatan03:08:25

[And, having used Elm, I can say that although specifics are slightly different the end result in terms of syntax is quite similar and in terms of mechanics almost identical].

mikethompson05:08:55

@johnatan you haven't given us much to work with. But this general answer might help you: http://stackoverflow.com/a/37186230/5215391

mnewhook12:08:43

I’ve used this template, but I often get an error:

history.js:907 Uncaught TypeError: Cannot set property 'value' of null
goog.History.update_ @ history.js:907
goog.History.onHashChange_ @ history.js:598
goog.events.fireListener @ events.js:728
goog.events.handleBrowserEvent_ @ events.js:852
(anonymous function) @ events.js:277

mnewhook12:08:17

anyone have any clue what causes this?

nilrecurring14:08:30

@mnewhook: please also open an issue on github so it doesn't get lost on slack :)

johanatan16:08:12

@mikethompson: nope, that really doesn't help much. My situation is this: a v-box with N h-boxes inside. I put a valid/meaningful key on the h-boxes like so: ^{:key the-key} and yet when I examine the data-react-ids for the h-boxes, they do not have my key component.

johanatan16:08:48

I also tried doing :attr {:key the-key} on the h-boxes to no avail.

richiardiandrea22:08:05

@mikethompson: I was reading https://github.com/Day8/re-frame/wiki/Effectful-Event-Handlers#order-of-effects and you state that you would need to return a vector of maps in case order handling is necessary. Am I completely off in saying that you could use array-map in order to seq on the kv preserving the insertion order? Of course then your map cannot be that big (lookup is linear) but I don't see it growing super big anyways