Fork me on GitHub
#re-frame
<
2016-10-04
>
andre05:10:59

@shaun-mahood did you try re-frisk/add-data ?

andre06:10:10

it can be any data, not only ratom, and you can update it as well, you can use it as is ,or organize specific structure, for example you can add log-ratom, and update data in that ratom, using your function (one-time-log x)

andre06:10:51

@shaun-mahood so, is re-frisk works in the separate window for you?

andre07:10:23

debugger warning fixed in 0.2.1, and also removed the annoying debugging println (emit)

andre08:10:50

if want to keep all your data changes you can add timestamp as a key for example

lwhorton14:10:30

is there a way that I can guarantee re-frame changes to the db have been flushed to the dom before I attempt to render a component?

lwhorton14:10:10

for example, if I have a [:button] that when clicked affects some db change, then a component which wants to do a manual querySelection() after did-mount… how can I click that button -> db change -> render with changes (but not component waiting on querySelector, because the target node doesnt’ exist yet) -> render component with selector now that node exists

lwhorton14:10:44

I can obviously do a requestAnimationFrame before rendering, but I’m curious if there’s a less-icky way to tackle this

shaun-mahood15:10:49

@andre: I got it working in the separate window, thanks! add-data seems to be working to log data, I'm having a bit of an issue getting it to work from within a reg-event-fx function but it works outside of it and within reg-event-db functions, so I think it's probably an issue with something else in my code. Thanks for the help, and for getting rid of the emit call.

shaun-mahood16:10:00

@andre: I got everything working, it's really nice to use so far - thanks for making it!

andre17:10:57

@shaun-mahood glad to hear, thank you for sharing your experience and feedback

si1419:10:32

which html5 history library do you use? There are https://github.com/kibu-australia/pushy and https://github.com/venantius/accountant at least, but both seem like their maintainers have a lot to do besides maintaining them :)

johanatan22:10:57

@si14 i just use secretary which comes bundled w/ re-frame (but I'm not doing anything extravagant )

mikethompson23:10:03

@johanatan secretary is not built into re-frame

danielcompton23:10:02

https://github.com/cursive-ide/cursive/issues/1549 give this issue a +1 if you use Cursive and would find the feature useful

johanatan23:10:40

@danielcompton How exactly do you propose that Cursive know what is a registration and what is a mere reference? keywords in Clojure are created upon first reference [and without some pretty sophisticated static analysis, who knows which reference is "first"]?

johanatan23:10:41

@mikethompson sorry, I meant built into the project template/generator that everyone is using for re-frame (initial statement revised to reflect this)