This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-10
Channels
- # beginners (15)
- # boot (15)
- # cider (6)
- # cljs-dev (231)
- # cljsjs (1)
- # cljsrn (26)
- # clojure (147)
- # clojure-argentina (1)
- # clojure-dev (8)
- # clojure-germany (1)
- # clojure-italy (26)
- # clojure-russia (2)
- # clojure-spec (83)
- # clojure-uk (154)
- # clojurescript (123)
- # conf-proposals (3)
- # core-async (5)
- # cursive (26)
- # datascript (21)
- # datomic (120)
- # emacs (2)
- # graphql (9)
- # hoplon (195)
- # instaparse (16)
- # jobs-discuss (1)
- # leiningen (8)
- # luminus (8)
- # lumo (7)
- # off-topic (17)
- # om (7)
- # om-next (3)
- # parinfer (121)
- # pedestal (5)
- # planck (13)
- # re-frame (11)
- # reagent (21)
- # ring-swagger (2)
- # spacemacs (28)
- # uncomplicate (3)
- # unrepl (7)
- # untangled (34)
- # vim (5)
@andre yes indeed, that line of code seems to never be executed. As long as the mouse-up
happens within the component, it all works fine. When outside however, the behaviour (while not a show stopper), is definitely quirky. Will add an issue.
Has anyone tried the fsm approach from this post? http://blog.cognitect.com/blog/2017/5/22/restate-your-ui-using-state-machines-to-simplify-user-interface-development He mentions in the comments that it's part of a re-frame app.
@madstap Yeah, we're currently using something similar for re-frame apps where I work. It's worked pretty well for us.
We're prepping a lib to release as open-source that to help facilitate using FSMs with re-frame, but it's not quite ready yet.
I'll see if we can get something out in the next few days (even if rough) and will tag up with you.
I’m trying to understand how to use the enrich interceptor to do validation. I have a single field and I want to validate it’s contents before sending it’s value to a server. I’m trying to understand the flow of events and I want to make sure I have them correct. Am I on the right path with these steps: 1. Register an event handler with an enrich interceptor that does the validation. 2. Dispatch the registered event with the value of the input when a button is clicked. 3. In the event handler, assoc the value of the input in the db and include an :http-xhrio effect in the returned value. 4. The interceptor checks the value in the app-db and validates it. If the value is invalid, set a value in the app-db to indicate to the subscribed view to display an error AND then remove the :http-xhrio effect from the interceptor so the value is not submitted to the server.
Is this the right approach?
Is the last part of 4 correct, removing the effect to avoid submission to the server. Is that the place to do it?