This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-27
Channels
- # alda (21)
- # announcements (7)
- # beginners (70)
- # boot (95)
- # braid-chat (28)
- # bristol-clojurians (2)
- # cider (22)
- # clara (4)
- # cljsjs (13)
- # cljsrn (40)
- # clojure (93)
- # clojure-argentina (1)
- # clojure-art (1)
- # clojure-miami (3)
- # clojure-norway (1)
- # clojure-portugal (2)
- # clojure-russia (39)
- # clojure-sg (3)
- # clojurescript (25)
- # clojurian-chat-app (4)
- # community-development (5)
- # conf-proposals (20)
- # cursive (48)
- # datomic (39)
- # devcards (5)
- # dirac (4)
- # editors (2)
- # events (11)
- # funcool (65)
- # hoplon (95)
- # jobs (12)
- # ldnclj (4)
- # lein-figwheel (2)
- # leiningen (1)
- # om (311)
- # onyx (20)
- # philosophy (4)
- # proton (41)
- # re-frame (83)
- # reagent (49)
- # ring-swagger (3)
- # spacemacs (8)
- # yada (5)
toying around with using reagent for style sheets: https://gist.github.com/selfsame/cd61ba7f78f6f21515d7
what would be your approach with reagent/re-frame for editing of nested datastructure ? For instance I have scenarios which are composed of requests which are compose of parameters, I have a component for each submodel. to give the subcomponents the ability to modify the data they represent I have scenarios, requests and parameters in my app-db referenced by uuids and I pass the uuid of the model to represent to the child. A request has a list of parameters UUIDs and each parameter component subscribe to the corresponding parameter in the app-db, allowing me to edit without knowing of the request. Does it seems like a correct approach or do you have a better solution in mind ?
How would you go about using a react library in clojurescript/reagent, like material-ui?
a) compile modules out with something like browserify/webpack, b) use that as foreign lib, c) just call adapt-react-class
on the components from that library.
For material-ui this example might be instructive - https://github.com/tuhlmann/reagent-material
Well, cljsjs is not necessary for anything, it's only a convenience to get prepackaged libraries easily. If you have to preprocess them on your own to remove the modules (since Clojurescript can't deal with them as-is), then you don't gain much by using cljsjs.
Also, if you use material-ui, I think you'll have to package React with it on your own, co you won't be able to use cljsjs for React anyway.
the advantage of cljsjs would be that you could all compile it with the closure compiler in advanced mode, I would say
reagent has a dependency on the cljsjs version of react. Would I need to specify somehow that I don’t need it when I’m packaging react on my own? Otherwise I would have it in my closure compiled code and my js libraries package.
As for how to deal with reagent having the dependency - do the same the sample project did
So you should probably just create a minified version with whatever webpack/browserify provide you (probably just whitespace striping and locals renaming)
And not because you need react-tap-event-plugin only, because the library needs to be able to require
React - with cljsjs you can't do that IIRC.
Though, that's just how I think it works, maybe I'm misunderstanding something and someone who knows how cljsjs works for sure to weigh in.
ah yes, forgot about that; the external library can’t be compiled with the closure compiler unless it’s written with the closure compiler in mind
If you (.stopPropagation e)
at the end of child handler (so you stop the propagation), then it should work.
when passing in attributes to svg elements, i noticed that some get scrapped off:
(defn make-svg-filter []
[:filter {:id "blur-effect"}
[:feGaussianBlur {:stdDeviation "0.9"}]])
produces
<filter id="blur-effect" data-reactid=".7.0"><fegaussianblur data-reactid=".7.0.0"></fegaussianblur></filter>
@rodeorockstar: just a guess, but try :std-deviation instead of :stdDeviation and see if that works
@rodeorockstar: https://github.com/chr15m/tiny-cljs-game-engine/blob/fa6175004fdbc232bf661f40e6fdc28d639d360d/src/cljs/reagent_game_test/core.cljs#L106
ding ding ding, we have a winner! thanks, @gadfly361