This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-01
Channels
- # beginners (133)
- # boot (59)
- # cider (5)
- # cljs-dev (30)
- # cljsrn (23)
- # clojure (212)
- # clojure-austin (3)
- # clojure-brasil (1)
- # clojure-chicago (5)
- # clojure-italy (10)
- # clojure-russia (5)
- # clojure-serbia (1)
- # clojure-spec (34)
- # clojure-turkiye (2)
- # clojure-uk (132)
- # clojurescript (163)
- # clojutre (1)
- # cursive (5)
- # datomic (58)
- # emacs (42)
- # events (1)
- # graphql (26)
- # hoplon (16)
- # jobs (1)
- # lumo (27)
- # numerical-computing (3)
- # off-topic (127)
- # om (9)
- # onyx (24)
- # re-frame (20)
- # reagent (20)
- # ring-swagger (14)
- # sql (19)
- # unrepl (28)
- # untangled (3)
- # vim (8)
- # yada (17)
Has anyone done a reagent/react wrapper around Google’s Material Design components? https://github.com/material-components/material-components-web/tree/master/framework-examples/react?
Do you know any library or sample project which I can refer to implement reagent to fetch GraphQL ?
@cl0jurian I wrote a GraphQL library for ClojureScript - https://github.com/retro/graphql-builder/ . We use it successfully with our Keechma / Reagent apps. Yesterday I’ve published a demo that shows how to use it with some advanced features like query composition. You can find the source code here https://github.com/keechma/example-dataloader-graphql and the walkthrough video here https://www.youtube.com/watch?v=dZaY1kZwpmw .
I'm using react-bootstrap-table with reagent and currently trying to realize the expanding columns. This is done with an function which returns an component. That function is provided as a prop to the BootStrapTable Compontent. But this don't work with reagent, as the component isn't converted into a react class. So react complains about the invalid react child. How can I manually create the react class from the hiccup structure?
@gadfly361 Great thank you.
Hi ! When I do a swap!
on a ratom, does that immediately lead to the component which dereferences that ratom being re-rendered? Or is it done on the next 'tick' (if that's a thing in the browser/react) ?
In other words, if I do several swap!
operations on the same ratom one after another in the same function, does that lead to my component being re-rendered multiple times ?
👍 @mihaelkonjevic: Thank you, exactly what I needed !
@cl0jurian Hmm, I am no experiencing that... I updated the code to some dummy strings (since I don't have access to one-map) and the modal looks normal
[sa/Modal
{:trigger (reagent/as-element [sa/Header "Trigger"])}
[sa/ModalHeader "Modal Header"]
[sa/ModalContent
{:image true}
[sa/Image {;:wrapped true
:size "large"
:src ""}]
[sa/ModalDescription
[sa/Header "Modal Title"]
[:p "Modal Body"]
]]]
@gadfly361 oops sorry I forgot to mention this section of code is running within a for function.
(for [one-map news] [ ... ] )
Would that be the reason to cause this behavior, do you think?
@cl0jurian I just tried it, and didn't experience it. Though I am iterating over a seq of numbers. I am curious if one-map being a javascript / mutable object matters .. i wouldn't think so, but that is a difference. When you say the modal bounces, it seems like multiple triggers of the modal are firing...or perhaps multiple modals? I am not sure tho.
(for [i (range 10)]
^{:key i}
[sa/Modal
{:trigger (reagent/as-element [sa/Header (str "Trigger" i)])}
[sa/ModalHeader (str "Modal Header" i)]
[sa/ModalContent
{:image true}
[sa/Image {;:wrapped true
:size "large"
:src ""}]
[sa/ModalDescription
[sa/Header (str "Modal Title" i)]
[:p (str "Modal Body" i)]
]]])
@gadfly361 I get this weird behavior on chrome and firefox both on win 10 (64bit).
@cl0jurian Just curious, but if you replace your for loop with the one i provided, does the bouncing still happen?