This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-09
Channels
- # announcements (5)
- # babashka (1)
- # beginners (116)
- # calva (139)
- # cider (11)
- # clara (2)
- # clj-kondo (13)
- # clojure (247)
- # clojure-dev (18)
- # clojure-europe (5)
- # clojure-france (2)
- # clojure-italy (2)
- # clojure-nl (7)
- # clojure-spec (24)
- # clojure-uk (34)
- # clojurescript (41)
- # cursive (11)
- # data-science (2)
- # datomic (33)
- # emacs (10)
- # events (3)
- # fulcro (134)
- # graphql (9)
- # jackdaw (3)
- # jobs (1)
- # joker (20)
- # kaocha (3)
- # leiningen (7)
- # luminus (2)
- # malli (3)
- # music (1)
- # pedestal (7)
- # re-frame (25)
- # remote-jobs (7)
- # ring (7)
- # shadow-cljs (85)
- # spacemacs (13)
- # testing (2)
- # tools-deps (60)
- # xtdb (11)
- # yada (7)
Anyone know how I could go about aborting in-progress http requests - does re-frame have this feature implemented yet?
@sansaripour Check this out. Not done, but I don’t think previous version supports cancellations https://github.com/Day8/re-frame-http-fx-2
@lucio I figured it out finally. It was (predictably) a bug somewhere else--I messed up the structure of the component so that the subscriptions were only being deref’ed at component mount time. The actual render function was then using only those original values, so no apparent update would ever happen.
Yeah, I managed to invent a form-1-and-three-quarters. :face_with_rolling_eyes:
I've seen a number of libraries that seem to be about making form-handling smoother in re-frame but they seem a little old and unmaintained. I'm wondering, since I am about to start doing some forms, is such a library still a necessity or has re-frame/re-com advanced to make forms easier? Or, if not, is there a recommended library that is maintained? Thanks.
@sandbags I am currently maintaining a very thin library 📚 that uses plain reagent and reframe to organize a bit the form components..if you want to give it a shot I’m glad to help: https://github.com/luciodale/fork
@sandbags You can use antizer if you like ant design
Not really reframe specific but very well with reagent /reframe
@andrea.crotti thanks, i've not come across ant design, I'm not sure what "enterprise class design" is either if it comes to that 🙂
Well I guess it depends what you are doing
But it helps creating nice forms without much effort
@sandbags I have found that form handling is just difficult and bespoke for a bunch of different ui-toolkits. Some make it easier but because most target JS you have to wrap and integrate your way of doing things all the same
A thing that seems to work for me is to have an implicit context or given path inside the app-db
that holds form state
then you can reference and check any part of the form from any other part of the form which is useful when you reach forms that do sophisticated autocomplete things and doesn't affect your code that much if you don't
@sandbags here is an example using antizer https://github.com/AndreaCrotti/elo/blob/master/src/cljs/byf/league_detail/add_game.cljs#L34 it doesn't help with the state management as @royalaid mentioned, but I think that's quite easy to deal with using re-frame anyway
this submap keeps track of the state associated with that form https://github.com/AndreaCrotti/elo/blob/master/src/cljs/byf/league_detail/handlers.cljs#L35 for example