This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-23
Channels
- # beginners (63)
- # cljs-dev (1)
- # cljsjs (1)
- # cljsrn (11)
- # clojure (208)
- # clojure-berlin (2)
- # clojure-dusseldorf (5)
- # clojure-italy (5)
- # clojure-norway (56)
- # clojure-russia (7)
- # clojure-spec (85)
- # clojure-uk (27)
- # clojurescript (191)
- # core-async (73)
- # cursive (4)
- # datomic (62)
- # defnpodcast (1)
- # hoplon (2)
- # jobs-rus (1)
- # juxt (14)
- # keechma (1)
- # leiningen (1)
- # lumo (126)
- # off-topic (2)
- # om (11)
- # onyx (27)
- # pedestal (52)
- # planck (21)
- # powderkeg (1)
- # re-frame (32)
- # reagent (14)
- # ring-swagger (1)
- # rum (3)
- # slack-help (19)
- # specter (23)
- # untangled (32)
- # vim (7)
- # yada (43)
Hi! What is the syntax for passing another component into another component as a named prop?
I have a React component expecting another React component handed to it in a prop named "trigger". What might be worth mentioning is that both components are pure JS-components acquired by inter-op. Using them with the [:> <component> {:prop-name <prop-value>}]-syntax works fine, as long as the props are strings and other basic types.
@torkan take a look at the example in this readme, which passes a component to a trigger prop: https://github.com/gadfly361/soda-ash/blob/master/README.md
Considering it is semantic I'm trying to get started with, I think it's as dead on as it gets 😊 Thanks!
@gadfly361 Checked it out now, worked as a charm!
@gadfly361: Have you tried the Popup-component? It doesn't seem to adhere to the position prop, the internal state is not updated as when doing it in JS
I am struggling with React's css transition group & reagent. I have a simple page switcher:
(def CSSTransitionGroup
(reagent/adapt-react-class js/React.addons.CSSTransitionGroup))
[:div
[:button {:on-click #(swap! question-id inc)} "next page"]
[CSSTransitionGroup {:transition-name "pageChange"
:transitionEnterTimeout 500
:transitionLeaveTimeout 300}
[:div {:key @question-id}
(get pages @question-id)]]]
When I click the button, I get Uncaught TypeError: Cannot read property 'findDOMNode' of null
. From line 593 in react-with-addons.inc.js which looks like this:
var node = ReactAddonsDOMDependencies.getReactDOM().findDOMNode(this);
If I remove the CSSTransitionGroup
my pages will switch correctly.
Has anyone encountered this issue before?@kenny I think it is the version of react you are using, see this issue: https://github.com/reagent-project/reagent/issues/290
@torkan, i haven't tried the popup-component. If i have some time, i'll try and ping you if i come up with anything helpful
@gadfly361 Yup, that sure sounds like my problem. Is this a bug in Reagent then?