This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-20
Channels
- # admin-announcements (26)
- # beginners (1)
- # boot (157)
- # cider (46)
- # clojure (52)
- # clojure-italy (19)
- # clojure-japan (31)
- # clojure-russia (61)
- # clojure-sg (3)
- # clojurescript (65)
- # clojurex (7)
- # clojutre (8)
- # datascript (15)
- # editors (19)
- # emacs (9)
- # funcool (13)
- # hoplon (74)
- # ldnclj (13)
- # liberator (20)
- # off-topic (70)
- # om (5)
- # onyx (1)
- # re-frame (5)
- # reagent (20)
- # testing (23)
Is there a lib function somewhere for making it easy to write reagent components which accept optional attr maps?
When making components, I typically pass a single map as an argument and destructure it using :keys
. if I want certain keys to be optional, I use the :or
keyword and set a default value.
or rather, how do you use such a map and have children (@gadfly361)
@tel ahh yeah, I have been making 'terminal' components without children, so like an input component or a select component etc, without any nesting. If I were to have children, id look more closely at re-com library for inspiration.
If you're using re-frame, then you can quickly add re-com with the re-frame template: lein new re-frame <app name> +re-com
Has anyone here tried using the Bubbletree.js library? https://vis4.net/blog/posts/tutorial-bubble-tree/
It's beautiful and simple.
But right now, whenever I include the vis4.js
file, my console displays TypeError: type.toUpperCase is not a function.
And my app won't render. I think this is an error React displays when a module isn't exported properly, or something. I'm not sure of the best way to fix that here.
I'll correct myself already - I went to reproduce the error in a minimal repo, but the error didn't appear! So it's not running up against Reagent itself - it's some other conflict. I'll keep tracking it down.