Fork me on GitHub

There's an issue with cljsfiddle, where sometimes there's nothing to unmount, so Run no longer works


@michael.heuberger: I’ve tried your user-menu component in clean reagent project and it works normally. I was using reagent "0.6.0-alpha2” and cljs-react-material-ui "0.2.12"

Petrus Theron10:05:24

Is there a guide to testing reagent components? One of our devs is new to ClojureScript and coming from Python grabs for mocking internal symbols (rebind) for testing components, which feels wrong to me. Can anyone substantiate my intuition about this or tell me I’m wrong?


For a while now I've been meaning to write up this kind of information about keys. If you are new to Reagent, you might find this interesting:


Hi all, I’ve been experimenting with CSSTransitionGroup. When I follow along with this recipe, it work great:


But when I try something a little more complicated (a tree view with list of lists) it doesn’t seem to work and I think I’m missing something subtle


anyone used CSSTransitionGroup in more complex widgets? any advice for troubleshooting?


ah ha! This was it. If I make sure that the css-transition-group is mounted before the list items that I want to animate, it works great. (


I’m having a really interesting problem


I have a component that represents a row, takes in two components that represent selected or deselected, and displays whichever one based on local state


i have a conditional in one of the components being passed in


and apparently when the row component re-renders, it’s not evaluating the higher up component so that conditional never runs again


so the component thats supposed to be displayed conditionally never shows up


any ideas on what I’m doing wrong here ?


@mattsfrey: Reagent is only going to re-render a component if data changes. settings-row doesn’t dereference @pw-focused?-, so it’s not going to know that it’s changed and that it should re-render


If I understand your code correctly


trying to think of a good way to stick to this model and have it re-render without doing something hacky


although it seems like I might have to pull the conditional for selected up into the parent component and just pass a “contents"


I’m not a reagent expert, but I wonder if there is a more idiomatic way of doing what you’re doing here


same lol, definitely doesn’t seem very good


@mattsfrey: can I see the code


sry I deleted the gist, I just decided to move the conditional to the parent component, no real other way to do it minus sending down an unnecessary prop just to force re-renders


@mattsfrey: I don't think I understand the whole context and I don't have any clojurescript experience whatsoever but I believe that you can also set the state of the result of the conditional in the 'row' component


Either that or pass it as a prop from the parent component (which I think you are already doing)