This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-08
Channels
- # announcements (8)
- # babashka (11)
- # beginners (63)
- # calva (1)
- # chlorine-clover (1)
- # cider (18)
- # cljfx (4)
- # cljs-dev (18)
- # clojure (17)
- # clojure-europe (20)
- # clojure-spec (2)
- # conjure (2)
- # data-science (6)
- # datomic (7)
- # depstar (17)
- # etaoin (2)
- # events (2)
- # fulcro (28)
- # graalvm (2)
- # graphql (3)
- # jobs-discuss (5)
- # off-topic (18)
- # pedestal (5)
- # reagent (6)
- # reveal (2)
- # shadow-cljs (39)
- # spacemacs (7)
- # xtdb (13)
Does anyone know what this might mean (React Native)?
(shadow/repl :dev-android)
To quit, type: :cljs/quit
=> [:selected :dev-android]
(def one 1)
=> #object[TypeError TypeError: undefined is not an object (evaluating 'cljs.user.one = (1)')]
I’m pretty certain it was working before, so I don’t quite understand what went wrong and whyjust a hunch but looks like cljs.user
is undefined. do you get the same error for (ns cljs.user)
or so?
@thheller btw - regarding hot reload questions I had a couple of weeks earlier. I figured out why recompilation messes up React Native hot reload. That’s because the entry point file target/index.js
gets rewritten every time - so at first Metro reacts correctly and tries to do a fast refresh, but then, when entry point file gets updated - it just reloads the whole thing.
Although I finally got it to work as you suggested, I’m wondering whether it would be possible to prevent the entry point from getting recompiled every time.
I mean I can't see a scenarion where metro fast refresh and shadow hot-reload won't conflict with each other and mess each other up
it might make sense to allow choosing one or the other (I don’t have a strong opinion about this - since I never got fast refresh to work, I don’t know how convenient it is compared to shadow hot reload)
It seems that the extern inference doesn't work well with the go blocks:
(defn f
[]
(.-foo (clj->js {"foo" 42})))
;; WARNING: :infer-warning
(defn f
[]
(.-foo ^js (clj->js {"foo" 42})))
;; no warning
(defn f
[]
(clojure.core.async/go (.-foo ^js (clj->js {"foo" 42}))))
;; WARNING again :infer-warning
I don't know. depends on the actual code. I mean if you actually use clj->js
and then access a property that doesn't make sense at all?
you should always have as little code as possible in go
blocks so ideally you never get to code that has to do this
What I'm actually trying to do is to wrap http://goog.net.XhrIo.send into a channel so that I don't have to do callbacks
but using this channel requires the user code to be in a go-block, right? That's where I have other code that needs type-hinting