This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-19
Channels
- # ai (3)
- # aws (1)
- # beginners (94)
- # boot (26)
- # cider (3)
- # cljs-dev (99)
- # cljsrn (86)
- # clojure (263)
- # clojure-dusseldorf (4)
- # clojure-greece (22)
- # clojure-italy (2)
- # clojure-quebec (1)
- # clojure-russia (12)
- # clojure-spec (71)
- # clojure-uk (123)
- # clojurescript (92)
- # core-async (4)
- # cursive (13)
- # data-science (2)
- # datomic (123)
- # docker (2)
- # emacs (15)
- # events (1)
- # graphql (2)
- # hoplon (71)
- # jobs-discuss (7)
- # lumo (5)
- # off-topic (12)
- # om (6)
- # onyx (97)
- # other-languages (4)
- # overtone (2)
- # pedestal (1)
- # re-frame (20)
- # reagent (33)
- # remote-jobs (1)
- # ring-swagger (1)
- # rum (5)
- # slack-help (6)
- # uncomplicate (1)
- # unrepl (33)
- # untangled (48)
- # vim (23)
- # yada (21)
Hello! I am using semantic ui react in reagent
was wondering how would you convert this
<Modal trigger={<Button>Show Modal</Button>}>...</Modal>
Tried this
[:> ui/modal {:trigger [:> ui/button "Show Modal"]} ...]
but I get:
Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
I use reagent and I've never seen :> used like that, what is it?
got these from https://www.opensourcery.co.za/2017/02/12/using-semantic-ui-react-with-re-frame/
@leontalbot see the readme of soda ash https://github.com/gadfly361/soda-ash
@noisesmith :> is syntactic suger for reagent/adapt-react-class
oh, OK
@leontalbot basically for the trigger you need to use reagent/as-element
really nice!
It works! Thanks @gadfly361 !
@dimovich it's a common issue
reagent has some special logic to deal with cursor position of input fields
if you use a 3rd party wrapper, reagent has no way to apply these hacks
@pesterhazy I see... That was also my impression from reading the comments on https://github.com/facebook/react/issues/955
one thing that people have tried is to run force-update
on every keypress, but not sure if that'll help in this case
another question... can I attach a component to a parent and not have to deal with for loops?
@dimovich how do you mean?
not sure what exactly you want to avoid
or what you want to achieve 🙂
@viebel I just merged your self-host PR and it broke this macro: https://github.com/reagent-project/reagent/blob/master/demo/reagentdemo/syntax.clj#L51
Any ideas how this should be fixed?
As this namespace is not used when using Reagent as library, I'll add the http://java.io require back the file