This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-24
Channels
- # announcements (1)
- # aws (140)
- # beginners (41)
- # calva (47)
- # cider (43)
- # clj-kondo (36)
- # clojure (178)
- # clojure-europe (12)
- # clojure-gamedev (2)
- # clojure-italy (1)
- # clojure-nl (17)
- # clojure-russia (3)
- # clojure-spec (37)
- # clojure-uk (97)
- # clojurescript (173)
- # core-async (16)
- # cursive (18)
- # data-science (2)
- # datascript (6)
- # datomic (32)
- # dirac (16)
- # duct (16)
- # events (2)
- # figwheel-main (7)
- # fulcro (8)
- # graalvm (18)
- # immutant (3)
- # joker (2)
- # kaocha (8)
- # nrepl (6)
- # nyc (2)
- # off-topic (62)
- # quil (3)
- # re-frame (18)
- # reitit (6)
- # ring-swagger (1)
- # shadow-cljs (119)
- # spacemacs (4)
- # specter (2)
- # tools-deps (10)
- # vim (58)
- # xtdb (9)
@kristian507 re-frame-template
has an example of using lein profiles to support this with shadow-cljs, but yep requires lein: https://github.com/day8/re-frame-template/blob/master/src/leiningen/new/re_frame/project.clj#L54
@kristian507 @U05224H0W has since commented at https://github.com/day8/re-frame-debux/issues/21#issuecomment-545858409
It would require me to do a new project or a shadow-cljs-specific ns I think for re-frame-debux (e.g. re-frame-debux-shadow-cljs
maybe). So not available yet but I am thinking about it and will get it done soonish.
you can just include the stub namespace and use the reverse logic. so it is enabled by default and disabled by including :ns-alias {da8.re-frame.tracing day8.re-frame.tracing-stubs}
for :release
Hi, I would like to add animation library react-spring to my re-frame project. What is the best way to deal with separate state of animation objects, compared to reframe DB atom?
What do you mean by 'state of animation objects' exactly ?
If you mean e.g.
(let [props (use-spring #js {:opacity 1 :from #js {:opacity 0}})]...
Does that work if you just use a form-2 for form-3 component and pass the props into a stye attribute ?
Ref
https://www.react-spring.io/docs/hooks/basics
https://github.com/reagent-project/reagent/blob/master/doc/CreatingReagentComponents.md
http://reagent-project.github.io/docs/master/reagent.core.html#var-create-classbasically, the spring object is keeping its local state which is used to update the style of a component, and on the other hand, I have reframe DB atom where all the state is stored
to give some example, suppose that my website consists of a div element with absolute position and I am recieving msgs from the server changing the position, and I want to add animation which slides the element to the new position.
currently, I have position in reframe DB and it will cause subscriptions to rerender when the position is updated (with no animation)
should I store in DB the new position and the old position separately and let the react-spring to do the animation? and what happens when another position is received while animation is running?
I would not store animation state in the DB. I don't view current animation progress as part of an application's state. At least, that's how it is usually - I have no idea what actually goes on in your app.
Makes sense, I will start with a simple experiment placing the object in a view and later will see whether some of these objects need to be stored in DB, so I can do some computations with them.
hi, does anyone know if order of dispatch
es is preserved? if i do:
(rf/dispatch [:event1 ...])
(rf/dispatch [:event2 ...])
am I guaranteed that event1 will have been handled before event2 is?based on this: https://github.com/day8/re-frame/blob/04433cfa60a8c8116e2b6aefd8fd253014285229/src/re_frame/router.cljc#L33 I am guessing, yes ...