Fork me on GitHub

Hello everyone! I have one common key for all my app-db. It looks so:

{:db {:swipe-component {:key1 value
                                               :key2 value
                                               :key3 value}}}
Thus my reg-sub looks like:
  :<- [::swipe-component]
  (fn [swipe-component]
    (:duration swipe-component)))
And It rerun every time when any item in my app-db have changed!


Is it correct at all? How can I watch only for the :duration key in the :swipe-component map?


@mikethompson Listened to your excellent defn interview, great stuff! 🙂 You mentioned using reagent bindings for Vega, would you care to share which one you're using?


We've rolled our own approach but try


Vega is big and powerful ... and more complicated Vega-Lite is much more approachable for simpler stuff


Cool, I like the possibility of using Vega-Lite for your day-to-day visualisations and using Vega for more complex ones


What made you roll your own approach rather than using oz?


does anyone have an example of remote streaming with re-frame? i'm new to the reactive stuff and i'm not sure how to fit it into clojurescript/re-frame


@mikethompson Ok, thanks! We've used that doc for adding highcharts components to our app. Vega got me very intrigued though.


@curlyfry ^^ will quickly give a sense of Vega-Lite (remember that Vega is more flexible and powerful)


Cool, I sort of feel like this is what I've been looking for when it comes to visualisations. I often feel a bit limited by higher level libs, and D3 always felt (while very cool) like too much work and a bit too imperative.


Yeah, there's a learning curve. But I feel like we'll be kicking goals with this for years to come.


What's the recommended way of doing animation with re-frame? My current approach is to have a (reg-event-fx ::animation-frame ...) that updates the animation state and dispatches to itself until the animation is finished. This works, and performs surprisingly well (even on mobile devices), but feels rather low-level.


hey again guys - i’m wondering if it’s possible to pause re_frame’s event execution via js/alert? i thought that alert just freezes literally everything until a user clicks “ok”, but reframe seems to be processing events in the background?


nevermind. i think my debugger was screwing up the order of execution. if i just let events flow js/alert does indeed freeze the world


I’m curious; what’s your use case for freezing event execution?


just logging out a user after X minutes of inactivity. it’s nice to show an alert as to why it happened


Is there a way to access the raw response from http-fx? I’ve googled and read some source code as well as supplied rest params to my success and failure handlers…not seeing a way to do this yet


Looks like I should have looked at the underlying library. Should be able to do this with


how can i pass an argument to :first-dispatch?


appears i can just pass in the same vector


Actually still struggling with accessing response headers from http-fx via cljs-ajax…


I’m able to get the raw Google XHRIO object as documented in the link above, but it doesn’t appear to contain any header information


@alex-dixon do you know if re-frame-http-fx can stream events to/from a server


I’m not sure but beginning to think maybe Clojurists together could help out cljs-ajax a bit. 🙂


sounds like a worthwhile pursuit


Or just a new one that uses fetch api. Only concern would be performance


Also compatability with node

Ivan Fedorov19:04:21

Is it feasible at all to use re-frame in a text editing web-app? Are there any cljs implementations of contentEditable-style text editors? Thanks in advance

Ivan Fedorov19:04:29

@raymcdermott sir, I'd be very grateful if you have shared your findings 🙂 Thanks in advance


I have only done it with textarea so far, that is next on the list for me


so I don’t have anything proper to share

Ivan Fedorov21:04:59

@raymcdermott I'm going to try to integrate draft.js, which is a React project. I can ping you, when I reach success or fail. If you want


@ognivo i am using re-frame with codemirror, draftjs... also have used it with prosemirror, substance... it is very easy to setup


i will be deploying some stuff as soon as i finish a merge i have been working on


interop with reagent is straightforward

[:> Editor-wysiwyg {:editorState         @state

                                                        :wrapperClassName    "demo-wrapper"
                                                        :editorClassName     "demo-editor"
                                                        :onEditorStateChange (fn [content-state] (on-editor-change content-state state entity-id))
                                                        :toolbarOnFocus      true
                                                        :toolbarCustomButtons [(r/as-element [custom-option state])
                                                                                   (r/as-element [insert-image-comp state])]
                                                        :toolbar             {
                                                                              ;:colorPicker {:component (r/reactify-component custom-option)}
                                                        :hashtag             {}
                                                        :mention             {:separator   " "
                                                                              :trigger     "@"...... ..... 


with draft js ended up using this wrapper instead of teh plugin system that is also quite popular


I’m making a REPL and am planning on porting over paten-soup


looks cool! I would love to share experiences... i am making a tool to build "interactive systems" from "conceptual models of the system"... i know i need to work on that pitch 🙂 some old WIP. multiple instances of draftjs, codemirror.... all backed by a rules based system with clara rules...


@ognivo i extracted a minimal gist of Draftjs how to use... no re-frame, r/atoms instead but same approach... jsut add events and subs 2 use cases... 1. init with no content 2. init with content

👍 4
Ivan Fedorov16:04:20

@U9VP9VCE6 whoa, thank you so much mate ❤️🍺


@raymcdermott i just watched your talk at DCD... that was great. Made me go into brainstorm mode about the posiblilities of a shared repl.... thanks!


thanks @U9VP9VCE6… I’m open to ideas 🙂


@ognivo I think @raymcdermott has been looking at that recently

👍 4