Fork me on GitHub
#re-frame
<
2017-02-20
>
scknkkrer06:02:55

Guys, I need to use ready-to-use template named gentelella with re-frame. (Link in bottom) I generate hiccup's (and html finally) and write it to page with all external libraries. But there is no script action on the page. What have I missed ? I read about the reagent components' life-cycles. But I don't sure how to implement this template idiomaticly... https://github.com/puikinsh/gentelella

scknkkrer08:02:05

Anyone ? 😓

rnandan27308:02:32

I want to use datascript with re-frame

mac10:02:13

@scknkkrer Don't see any link and I for one am not really clear on what your question is.

scknkkrer12:02:07

mac: you can take a look at it now, sorry for late response.

dottedmag11:02:19

@mac I bit the bullet and finally read the docs 🙂 Storing derived data in DB is not a good idea. (reg-sub :search-str (fn [db _] (:search-str db)) and (reg-sub :matching (fn [_ _] (subscribe [:search-str]) (fn [search-s _ _] (do-the-complicated-search search-s))) is the way to go.

scknkkrer12:02:33

Sorry, my bad.

mac15:02:33

@dottedmag Storing derived data can be a very good idea depending on your use case and so can component local state if you don't care about the search result for later use (incl replayability).

piotr-yuxuan23:02:14

Hey, have you been using re-frisk? sounds like an amazing tool — which one minor glitch: it keeps nix upon history export 😕