This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-13
Channels
- # aleph (3)
- # aws (1)
- # beginners (97)
- # boot (41)
- # cider (7)
- # clara (105)
- # cljs-dev (4)
- # cljsrn (66)
- # clojure (185)
- # clojure-argentina (2)
- # clojure-colombia (15)
- # clojure-czech (1)
- # clojure-dusseldorf (8)
- # clojure-greece (2)
- # clojure-italy (5)
- # clojure-russia (33)
- # clojure-spec (14)
- # clojure-uk (9)
- # clojurescript (75)
- # cursive (6)
- # data-science (1)
- # datomic (12)
- # emacs (2)
- # fulcro (71)
- # funcool (1)
- # jobs (6)
- # jobs-discuss (62)
- # juxt (21)
- # lein-figwheel (1)
- # luminus (9)
- # lumo (41)
- # off-topic (39)
- # om (12)
- # onyx (1)
- # portkey (2)
- # protorepl (4)
- # re-frame (14)
- # reagent (50)
- # ring (3)
- # shadow-cljs (6)
- # spacemacs (38)
- # specter (8)
- # test-check (14)
- # testing (52)
- # unrepl (2)
@souenzzo the discussion in this FAQ should help: https://github.com/Day8/re-frame/blob/master/docs/FAQs/Inspecting-app-db.md
summary: [:pre (with-out-str (pprint @interesting))]
heya, I just tried to upgrade reagent from 0.6.2 to 0.8.0-alpha1 in my react native project. I'm getting this error: Error: Cannot find module '@cljs-oss/module-deps'
, and then undefined nameToPath for react
. Has anyone seen this before and/or knows what it means?
Some of your library isn't useing react as module. Recommend checking this talk out that explains this a bit. If not, try npm install react
https://www.youtube.com/watch?v=NjPTyBXuDGE
thanks, I'll listen to the talk
i am using google reCaptcha (https://developers.google.com/recaptcha/). Its works fine in development mode. but it doesn't works in production mode. That is because of foreign-libs. I wrote externs file but that doesn't help.
another question, has anyone had any luck getting the :component-did-catch
lifecycle method working with reagent
I'm using the latest react so it should be there, but as far as I can make out, the thing isn't being called
@danieleneal That would depend on if Reagent has support for it though, right?
Reagent should pass additional lifecycle methods directly to React, if it doesn't have special handling for them
ah this is the clue I was looking for, thanks!
I was wondering if it passes them through
@juhoteperi @danieleneal Ok, but the latest Reagent release uses React 15.5.4, and ComponentDidCatch
is introduced in React 16
React 16 can be used by upgrading React deps
It will cause some additional warnings, but IIRC should work
yeah, I'm (attempting) to exclude reagents version of react using exclusions
(def react (js/require "react"))
(.-version react) => "16.0.0-alpha.12"
No need to exclude, just add new deps
ah, I've added the deps, and still can't get the new component-did-catch working. (.-version react)
still reports "16.0.0-alpha12". I suspect that the thing that's not working is "create-react-class", which I'm guessing doesn't support the component-did-catch
. Is there a way around this?
create-react-class should also pass all the methods to React
hmmm strange
I can't think of what else it might be 😬
but yeah, I guess you must be right - unstable_handleError works
Do you know anyway I can inspect the class to see if it has the lifecycle method?
It's not being run, and I don't know if that's because it's not there, or because I'm doing some other dumb thing
(js/console.log (r/current-component))
somewhere
hey everyone hope all is well with you. I would appreciate if I could get some help on a problem i am having.
which as I know with react would mean the proper code for that custom element will not run
@mackram how about [:> LineChart]?
@reefersleep so if i understand correctly I should write that as [:> "LineChart"]
What is LineChart - a custom dom element ?
Are Dom elements case sensitive? I thought they weren't
If you know how to do it in plain react, you can do the same from cljs
I.e. call createElement from a function
Then use [:> the-function]
I see interesting @pesterhazy
i thought too that dom elements were case insensitive but my tests show that they are not it seems
There's a wrapper create-element in Reagent's API somewhere I think
Or you could create the dom element yourself from component-did-mount as a child of e.g. a div
It's possible that react normalizes tags