This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-16
Channels
- # aleph (4)
- # bangalore-clj (10)
- # beginners (39)
- # boot (24)
- # cljs-dev (66)
- # cljsrn (79)
- # clojure (39)
- # clojure-italy (7)
- # clojure-russia (6)
- # clojure-spec (4)
- # clojure-uk (1)
- # clojurescript (91)
- # core-async (1)
- # core-typed (2)
- # datomic (49)
- # hoplon (42)
- # lumo (2)
- # nyc (1)
- # off-topic (1)
- # parinfer (20)
- # pedestal (2)
- # reagent (4)
- # rum (14)
- # vim (2)
In the render fn, is there a way to force a child component to be re-created from scratch? E.g. if one of my args changes, I don't want to just pass the changed arg down the tree, because I know the child will not be able to deal with the change. I want to destroy the child and re-create it.
And yes, I know this is not the expected way to use React. I hit a corner case (complex forms where the number of fields can change).
My forms library (rather extensive by now) assumes that the form manages tons of local state. I don't see a way to reconcile this with the number of fields changing. It's easier to just recreate the form in that case.
TFW you wrote a declarative forms library, and now you auto-generate data for it and use gensym
…
forms libraries, oh the joy
here are some of my previous approaches 😄 https://gist.github.com/martinklepsch/e1366008c5a478b33c00d324314da4fd
@martinklepsch after about, oh, 12 years or so of thinking about the problem (and after having built at least five) I feel slightly more qualified as far as forms libraries are concerned 🙂