This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-15
Channels
- # beginners (138)
- # bigdata (2)
- # boot (45)
- # cljsrn (29)
- # clojure (108)
- # clojure-austin (1)
- # clojure-gamedev (1)
- # clojure-korea (9)
- # clojure-russia (50)
- # clojure-spec (2)
- # clojure-uk (28)
- # clojurescript (40)
- # component (1)
- # cursive (35)
- # datomic (39)
- # dirac (16)
- # emacs (22)
- # flambo (11)
- # funcool (6)
- # hoplon (74)
- # leiningen (4)
- # off-topic (1)
- # om-next (2)
- # onyx (141)
- # planck (7)
- # proton (10)
- # protorepl (4)
- # re-frame (21)
- # reagent (13)
- # remote-jobs (1)
- # ring (3)
- # specter (9)
- # sql (3)
- # test-check (14)
- # untangled (1)
- # vim (9)
- # yada (16)
Is there a way to remove the global reference to the re-frame.db/app-db
? I’m trying to use Stuart Sierra’s Component library with re-frame, and it feel like a hack directly modifying the global state to reset it. Also, I’m trying to use datascript and it feel wrong to (swap! re-frame.db/app-db assoc :ds-db datascript-db)
into it just so I can access it from within handlers and subscriptions. Ideally, I’d be able to pass in whatever data structure I want and have that handed over to handlers and subscriptions.
We developed https://github.com/Day8/re-frame-async-flow-fx for use with re-frame - it is similar in intent to Component in terms of setup, but it doesn't have a teardown part.
To "inject" a datascript connection into an event handler, I'd be using an Interceptor which adds the connection to the coeffects
That's how app-db
is made available ... an interceptor adds it to the coeffeects
Cool. I’ll look into this. Thanks!
I am trying to use a javascript library to render a document in a component in my app. the problem is that the div where the document is rendered is targeted with jquery. It works the first time I go into a pannel but the second time it seems like jquery doesn't find the div anymore but it is still there.
I tried using a tier 3 component but then the component doesn't update when the document becomes available
@danielcompton yes. but it will not work out of the box with the undo/redo 😞
@ericfode yes, I was inspired by elm conference and their debugger. but I think not all using def-view macro, I think this is a really useful thing. for me at least 🙂
using prints I noticed that diagram in :reagent-render is there but in component-did-update it is nil
note that the first time I visit the page an event ask for the diagram with ajax so it is nil, and is added to instance via the subscription
the reason I am trying to call utils/diagram-view after mount is because it is an external js lib that grabs the div with xquery
is it possible that component-did-update is still using the old value of diagram (nil) ?
that way diagram-view is only rendered when diagram exists and the jquery selector is only applied after mount.
guys, im trying to make a dead simple dev server for SPA with re-frame and i stumbled upon the routing problem i just want to serve css and js as asstets and on all other request return index.html (for client-side routing) how should i configure my server? this doesn’t work for me
(defn handler [request]
{:status 200
:headers {"Content-Type" "text/html"}
:body (slurp ( "resources/index.html"))})
(defroutes routes
(context "/static" []
(route/resources "/css" {:root "css"})
(route/resources "/js" {:root "js"}))
(GET "/*" [] handler))
(def wrapped-routes
(-> routes
(wrap-content-type)))
it’s funny. i just want to serve a couple of files 😁