Fork me on GitHub

Hi, I’m trying to render forms, but having trouble with element attributes that have single word attributes


is there a way to render something like <button disabled> in reagent? I mean, I can include :disabled “” in the options map, but if I want the disabled state to be reactive I have to construct the option map in a let form and then do an if form to assoc the diabled to it, etc, which all seems very messy.


@credulous: :disabled true and :disabled false work fine for me 🙂


or :disabled nil, rather


The result is either <input disabled> or <input>


Thanks! I tried :disabled false but for whatever reason not :disabled nil


is there a way to force unmount/mount an already rendered component? I know about force-update but that only seems to trigger a rerender when the props haven’t changed, but i really just want to force a complete destroy/create cycle of the reagent component.


@lwhorton my memory says give the component a new :key but it remains silent about whether that applies generally or only to components in collections


A question on :component-did-update life cycle method, from what I gathered this should somewhat equal to :component-did-mount, everything should be rendered according to the current state after a update happened. I have a modal with multiple steps, in one of those steps I need to pass a freshly rendered html node to a JS component, but even though everything should be rendered a node lookup in :component-did-update returns nil. When I close the modal the lookup works. Is this one of those async rendering quirks of reagent?


@yogthos I opened PR yesterday to update Reagent to React 15.4:


@juhoteperi fantastic, I'll take a look


React core / dom / dom-server split will require some breaking API changes to prevent output size getting larger, but other than that it should be simple


@juhoteperi incidentally, shouldn’t the output get pruned by the closure compiler?


I recall that only stuff that’s actually referenced gets compiled into the minified version


@yogthos No, foreign-libs are included if they are required by any namespace


and foreign-libs are not dead-code-eliminated, they are included as is


ah I see, it’d have to be compiled in directly


There was a separate issue about this: where I also explained this


makes sense, and I agree that including react.dom.server explicitly is the right way to go


@curlyfry why not use map-indexed and build the key with the index?


what's the best/easiest way to import a NPM module for frontend/client-side use (and this NPM module has 4-5 other modules as dependencies). Neither it or its dependencies are currently provided by CLJSJS [i haven't looked yet at the dependencies of those 4-5 other modules but if they each have a handful of dependencies, this could get painful fairly quickly] The root module in question is: react-swipeable-views if anyone knows about or alternatives to this functionality in particular