This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-31
Channels
- # aleph (9)
- # bangalore-clj (1)
- # beginners (115)
- # cider (16)
- # clara (20)
- # cljs-dev (47)
- # cljsrn (50)
- # clojure (70)
- # clojure-dusseldorf (2)
- # clojure-italy (16)
- # clojure-sanfrancisco (1)
- # clojure-spec (9)
- # clojure-uk (37)
- # clojurescript (132)
- # cursive (21)
- # datomic (36)
- # dirac (53)
- # fulcro (34)
- # graphql (6)
- # hoplon (96)
- # jobs (2)
- # juxt (2)
- # keechma (2)
- # leiningen (5)
- # off-topic (3)
- # om (2)
- # om-next (3)
- # parinfer (3)
- # re-frame (17)
- # remote-jobs (1)
- # shadow-cljs (57)
- # specter (12)
- # sql (43)
- # unrepl (11)
- # yada (5)
New video in the basics series. The tour one was out of date, so I deleted it and renumbered. The new video was added at the end: https://youtu.be/HJBI24yAdBQ
It covers UI routing. Some of that material was covered in the Union Query video (briefly at the end), but this new video goes into quite a bit of detail on what your options are, shows you the path of development that led to defrouter
, and goes through details of joining defrouter together with HTML5 history events, URL matching (with bidi), and even a demonstration of how to deal with routes that need to load their content.
I’m looking into using react-transition-group
with fulcro’s UI routers and it seems promising. The problem is that the routes lose the fulcro dynamic bindings because react-transition-group
’s API takes in a function child. This is a known issue with om.next, and some have solved it by rebinding within the function child. [1] I’m almost certain that the fix for fulcro is similar. I was just wondering if some additional thought has been put into this, and if a better way exists or is planned for the future.
[1] https://github.com/hugoduncan/navigator-repro/blob/master/src/navigator_repro/macros.clj#L3
@levitanong Any fix for Om Next that works at the UI layer should work with Fulcro.
@tony.kay thanks for the clarification. On the topic of the library design, yeah it makes me uneasy too. I mean, if one must use a function, then why not pass it as a parameter/attribute? It seems to have a strong foothold in the react community though.
strangely, though, there are examples of using it without a function in the facebook docs: https://reactjs.org/docs/animation.html
yeah, that example is specifically for the CSSTransition.
that would be useful to a lot of people!
an example in the book might be more accessible though
such that it is not constrained by time
I had used CSSTransitionGroup with Fulcro at dave conservatoire
I was trying to find the code, but I'm not using it anymore, have to hunt on history
just didn't needed, I was using for animating the progress bar, but later switched to NProgress
ha, just found the commit that did the change 🙂 https://github.com/daveconservatoire/dcsite-cljs/commit/b2da25a0a97e766e9e5a00b5f5fce9b03809cd23#diff-c2d7bca45cc641cdaaa9e61ec7952a22
does CSSTransition require an example? It seems like a fairly simple API. It’s the outlandish ones like for Transition and ReactMotion that violate the geneva convention
it's simple, I just did a wrapper, the hardest part IMO was just changing the React to use the version with the extensions
So @levitanong I’m confused. You asked about react-transition-group, then said that was easy, then said ReactMotion is really what you want…what is it, exactly, that is your problem?
You can access the raw children prop with (.. component -props -children)
if you need to implement something that way. Passing a function into children should work identically…it’s a standard react component. If it doesn’t then I’d consider it a bug.
NOTE: the prim/children
function always ensures that children is a sequence. Therefore if you pass a function to a Fulcro component and expect a function, you can either access the raw props, or (first (children this))
I can add something like that to Fulcro. I forgot about the bindings…you will need those
@levitanong I pushed 2.1.5-SNAPSHOT with prim/with-parent-context