This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-23
Channels
- # announcements (2)
- # beginners (165)
- # boot (11)
- # cider (11)
- # clj-kondo (7)
- # cljdoc (1)
- # cljsrn (5)
- # clojure (120)
- # clojure-dev (21)
- # clojure-europe (3)
- # clojure-france (1)
- # clojure-italy (62)
- # clojure-nl (8)
- # clojure-spec (26)
- # clojure-uk (40)
- # clojuredesign-podcast (1)
- # clojurescript (3)
- # cursive (2)
- # data-science (2)
- # datomic (10)
- # emacs (2)
- # figwheel-main (1)
- # fulcro (17)
- # graphql (5)
- # hoplon (5)
- # jackdaw (15)
- # jobs (2)
- # juxt (1)
- # luminus (5)
- # off-topic (1)
- # onyx (11)
- # pathom (4)
- # pedestal (1)
- # re-frame (4)
- # reagent (11)
- # reitit (1)
- # remote-jobs (5)
- # shadow-cljs (48)
- # spacemacs (2)
- # specter (4)
- # sql (24)
- # tools-deps (25)
- # vim (82)
what situation may cause this, when calling a function in repl it's said to be undefined, but it actually works. SOLVED, solved this by hard reload browser.
anyone figure out how to use moment.js with shadow-cljs?
@romain you probably want to use https://shadow-cljs.github.io/docs/UsersGuide.html#closure-defines
@currentoor what is there to figure out?
["moment" :default moment]
doesn’t work but it turns out they intentionally have the ES6 importable code in
["moment/src/moment" :default moment]
which works as expected
@currentoor ["moment" :as m]
probably works too. :default
is kinda dependent on how the package is packaged
@currentoor I suggest you check https://date-fns.org/ too, its a more modern and functional friendly time API
@U066U8JQJ this is a legacy project that i’m upgrading to shadow-cljs and newer fulcro
personally i like this
if i have clj on the backend, then i can write my logic in cljc
@thheller I have a cljs file whenever I save the file it will recompile but only generating the code of ns form in javascript
This is the code generated, but actually there should be a very simple hello function.
goog.provide('xycp.frontend.event.http');
goog.require('cljs.core');
goog.require('cljs_http.client');
goog.require('cljs.core.async');
goog.require('re_frame.core');
//# sourceMappingURL=xycp.frontend.event.http.js.map
@doglooksgood how is it defined?
(ns xycp.frontend.event.http
(:require [cljs-http.client :as http]
[cljs.core.async :refer [<! go]]
[re-frame.core :as re-frame :refer [reg-fx]]))
(defn hello [] 1)
this is the codemaybe you have some weird special character in the file? some unicode characters don't show up but can cause all kinds of weird stuff to happen sometimes
FWIW there are known race conditions and other problems if you combine the REPL with the regular live-reload
no need for a fix, but like me, I don't know this and run into this kind of issue twice today...