This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-17
Channels
- # aws (3)
- # beginners (81)
- # boot (155)
- # capetown (2)
- # cider (32)
- # clara (14)
- # cljs-dev (40)
- # cljsrn (12)
- # clojure (158)
- # clojure-austin (5)
- # clojure-korea (6)
- # clojure-poland (1)
- # clojure-russia (63)
- # clojure-spec (45)
- # clojure-uk (75)
- # clojurescript (109)
- # code-reviews (1)
- # core-logic (12)
- # core-matrix (1)
- # cursive (36)
- # datomic (16)
- # defnpodcast (1)
- # devcards (2)
- # editors (3)
- # euroclojure (1)
- # events (3)
- # flambo (1)
- # hoplon (19)
- # javascript (4)
- # jobs (1)
- # lein-figwheel (4)
- # leiningen (1)
- # off-topic (1)
- # om (177)
- # onyx (121)
- # pedestal (14)
- # planck (19)
- # proton (3)
- # re-frame (36)
- # reagent (21)
- # remote-jobs (1)
- # ring (4)
- # ring-swagger (6)
- # spacemacs (1)
- # specter (2)
- # test-check (4)
- # untangled (9)
- # utah-clojurians (1)
- # yada (2)
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>
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: https://github.com/reagent-project/reagent/pull/276
@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
There was a separate issue about this: https://github.com/reagent-project/reagent/issues/274 where I also explained this
makes sense, and I agree that including react.dom.server explicitly is the right way to go
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