Fork me on GitHub
#re-frame
<
2020-05-27
>
Spaceman03:05:04

How does one add an animation upon an element entering the dom?

Spaceman03:05:30

like the

ReactCSSTransitionGroup
?

Spaceman03:05:57

I'm using re-frame with reagent

mikethompson07:05:36

Are you new to re-frame? &lt;---------------- I'm interested in getting your feedback on the existing re-frame docs. Just a quick note in here saying what worked for you, and what did not. Suggestions, etc. Be kind, but also please be truthful. We can't improve if we don't get honest feedback - good and bad

jplaza19:05:47

Nice new docs page! I coincide with @lukaszkorecki it says that existing effect handlers are in the API docs but they aren’t https://day8.github.io/re-frame/Effects/#existing-effect-handlers

lukasz14:05:25

One thing that jumped out on me was the fact that I learned about :dispatch-n from... this Slack - I'm not sure if it's mentioned in the docs, or even if there's a table of all available effects, ways of dispatching events and subscribing to events. I'd have to look at the docs again, but ~3 weeks ago there was no summary of available APIs (if we can call them that way).

kaffein14:05:27

hi. I have a quick question surrounding the use of external 3rd party js react components please. I am currently trying to use Antdesign components List to render some data but it seems that I am not able to make it work correctly. the Antd List component is used liked this https://ant.design/components/list/:

<List
      size="small"
      header={<div>Header</div>}
      footer={<div>Footer</div>}
      bordered
      dataSource={data}
      renderItem={item => <List.Item>{item}</List.Item>}
    />
which I have translated like this in clojurescript :
(let [data @(rf/subscribe [:data])] ;; this is a re-frame subscription
    (fn []
      [:> ant/List {:size "small"
                    :data-source data
                    :render-item #([:> ant/List.Item %])}]))
1. Is the way I use :data-source correct here ? or should there be some data translation from cljs to js clj->js ? 2. or is the way the :render-item fn is implemented, wrong ? thanks in advance

jeff.terrell15:05:56

Is there some way to access the app-db value/ref from a CLJS console connected to a running app (e.g. via Figwheel)? I'm looking through the re-frame code and not finding anything so far.

jeff.terrell15:05:53

Never mind, asked a bit too soon: re-frame.db/app-db.

jeff.terrell23:05:24

Nice, thanks! I do wish Firefox would get some of the cljs-devtools features. Someday I’m gonna get cozy with all of this documentation. Thanks for all of your work on it!

mikethompson20:05:49

@https://app.slack.com/team/U0JEFEZH6 @jplaza ah, yes those effects got lost in the translation from old to new. Thanks, will adjust.

👍 4
sveri21:05:20

Hi, I wonder what the idiomatic approach to the following problem is. I have an input (textfield) and the inputs value is determined by the state of the application. The value is updated whenever the state changes. Now, as this is an input field, the user is able to type inside the input field, changing the value, which then updates the state of the application, leading to a neverending loop.

sveri21:05:34

How do you usually handle this problem?

p-himik21:05:54

There's no problem because the component will not be re-rendered if the input is the same. Hence, the on-change event will not be called.

David Pham04:05:11

I create a local state with an atom, and the value is updated whenever the user leaves the input field or press the enter key.

sveri08:05:49

@U2FRKM4TW Yea, that makes sense, thanks for that obvious answer 🙂