Fork me on GitHub
#clojurescript
<
2017-04-19
>
sniperliuhao01:04:08

hi, did anyone try to build a clojure GUI builder especially react related? how could it be done? a. walk an XML to make it b. put an list/vector to macro, build from there, but symbol resolve is not easy. c. generate as cljs file, send to backend compile and bounce back d. …

oahner02:04:56

so I've been playing around with *warn-on-infer* and I'm getting a weird behavior

oahner02:04:24

WARNING: Cannot resolve property createElement for inferred type js/HTMLDocument in expression (. js/document createElem
ent "div") at line 6 src\hello_world\core.cljs

oahner02:04:45

it seems all the methods and properties on js/document give that same warning

oahner02:04:21

on the other hand, methods and properties on js/window works fine

benny06:04:17

how can i turn the result of a go block into a value to use in a map?

benny06:04:59

in other words how can I turn

(go (<! (get-item :token)))
into something I can associate in a map?

jimmy06:04:37

@benny you can return the result through a callback

thheller06:04:23

@benny put your map into an atom or volatile!

minikomi07:04:54

Oh wow.. just had a terrible bug. The part of goog.net.Jsonp which processes the scheme for a uri (http. https..) was being renamed to ga on advanced compilation .. ga is also the default name of the function which google analytics gives you.. which was returning undefined when called with the scheme string. I couldn’t figure out why http:// urls were becoming “://example.com” urls only in this specific case.. Not much to share, other than you can rename the analytics function if this happens to you! Case closed 😓

thheller07:04:20

@minikomi you are missing :externs for google analytics

minikomi07:04:40

worked a charm, thanks.

dnolen10:04:57

@oahner you will need to check the externs that Google ships to see if that’s covered - if it is then file a bug report

rorygibson11:04:44

https://techcrunch.com/2017/04/18/facebook-announces-react-fiber-a-rewrite-of-its-react-framework/ I wonder if Om, Reagent et al will be much affected by this - claims are for “full backwards compatibility”

thheller11:04:49

@rorygibson some things may be affected but for the most part things should just work

danburton23:04:36

clj-uuid doesn't support cljs, right? How much work would it be to reimplement some of that java stuff so that the same api could be used in cljs?

anmonteiro23:04:18

does it have the same API?

anmonteiro23:04:50

probably not what you’re asking