This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-28
Channels
- # aleph (2)
- # beginners (25)
- # boot (12)
- # cider (73)
- # cljs-dev (3)
- # clojure (37)
- # clojure-dev (93)
- # clojure-germany (1)
- # clojure-italy (24)
- # clojure-nl (21)
- # clojure-russia (26)
- # clojure-spec (37)
- # clojure-uk (80)
- # clojure-za (1)
- # clojurescript (47)
- # cursive (4)
- # data-science (17)
- # datomic (69)
- # emacs (19)
- # events (7)
- # fulcro (41)
- # hoplon (14)
- # leiningen (2)
- # nrepl (4)
- # off-topic (253)
- # om (11)
- # portkey (2)
- # re-frame (11)
- # reagent (24)
- # ring-swagger (1)
- # rum (5)
- # schema (1)
- # shadow-cljs (106)
- # specter (2)
- # tools-deps (91)
@kasuko here’s one library I’ve seen https://github.com/district0x/district-ui-graphql - I think you might be interested. As for me, I understand GraphQL way easier than fulcro/om.next’s way of graph query. Plus, re-frame provides a way to make complex event processing logic much understandable. So I think re-frame + graphql would be really awesome.
How would I get ahold of a React component instance?
So that I could, for example, var x = <SomeComponent />; x.someMethod();
?
@colindresj using ref
is the most straightforward way
:thumbsup: Thanks
@colindresj https://github.com/reagent-project/reagent/blob/5548ad0866a0aacd579e963a21c75c31347aeb5a/doc/FAQ/UsingRefs.md
@pesterhazy Thanks, that’s how I’ve previously done them, but it looks like the latest React encourages you to go the React.createRef
route vs callbacks
you don’t really need the createRef mechanism to do what you want to do, though. that interface is useful for forwarding refs around and through functional components
React is pretty good about backward compatibility, I wouldn't worry about deprecation
Sure, but it looks like the object created by createRef
is effectively an atom in CLJS-terms (immutable container around value), so I feel like it’s a more convenient version of the same thing
Hi, I am trying to integrate https://www.npmjs.com/package/react-container-dimensions into my reagent + figwheel app. I used :npm-deps to define mine dependencies
but whenever my component renders, I get an error inside the react-container-dimensions that ReactDOM is not defined, but in the stack trace I see a very helpful Error (Uncaught Error: ^_^) inside react-dom.inc.js . Also, when I require react-dom
in my component, it is nil. Did anyone have a similar error yet 😄?
Looks like you are using cljsjs/react and cljsjs/react-dom as you have react-dom.inc.js
. You can't mix cljsjs and npm-deps.
Installing react ja react-dom using npm should be enough. Cljsjs packages are still useful for externs, and the JS code from those is not used if npm packages are available.
Hm yes. Do you also have :install-deps true
and are the packages present in node_modules
? Also try cleaning output-dir.
@juhoteperi yes and yes
what about create-react-class
, I guess that can be easy to forget but Reagent uses that also
@lee.justin.m Externs can be provided when using :npm-deps