Fork me on GitHub
#reagent
<
2017-07-31
>
mikethompson00:07:11

@deadghost I'm surprised you'd ever have to use lifecycle functions

mikethompson00:07:09

If I'm reading you correctly, on bootup, you need to wait for two HTTP calls to suceed, right?

mikethompson00:07:14

And, until the 2nd one succeeds, you don't want to render the UI (or some part of it)

mikethompson00:07:10

(defn  main-panel 
   []
   (if-not @(subscribe [:booted?])
      [:div "Loading ..."]
      [full-ui]))

gadfly36112:07:01

Excited to try it out

juhoteperi12:07:20

I updated a work project to this and used :global-exports with local foreign-lib defs like in the upgrade guide

juhoteperi12:07:59

React-leaflet npm package doesn't seem to yet work directly

benbot14:07:53

Hey, I asked this yesterday, but I've been messing around and still haven't been able to find an answer. How can I call a member function of a component? I tried reacitfy-component but I still wasn't able to call (.memberFunction component arg) because cljs still said that the member function didn't exist

pesterhazy14:07:23

@juhoteperi what error did you see?

juhoteperi14:07:38

WARNING: JSC_JS_MODULE_LOAD_WARNING. Failed to load module "warning" at /home/juho/Source/x/y/node_modules/react-leaflet/lib/Pane.js line 47 : 4

juhoteperi14:07:17

Just found the reason, Closure doesn't support package.json browser field: https://dev.clojure.org/jira/browse/CLJS-2289

pesterhazy14:07:12

didn't know about that field either

pesterhazy14:07:16

I suppose it's a webpack thing?

juhoteperi14:07:54

Browserify also

pesterhazy14:07:50

do you have a pointer to the docs by any chance?

joshkh14:07:04

these react event bindings work except for :on-drop. any ideas? 🙂

{:on-drag-start (fn [] (println "drag start"))
 :on-drag-over (fn [] (println "drag over"))
 :on-drop (fn [] (println "drop"))
 :draggable true}

deadghost15:07:41

@mikethompson nope not on bootup, my app makes http requests and load resources whenever the url is changed, the nav has to survive this process without re-rendering unless the end data state really has changed.

joshkh15:07:16

oops, i needed to prevent default on drag over. user error.