This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-09
Channels
- # announcements (1)
- # aws-lambda (3)
- # babashka (6)
- # beginners (91)
- # bristol-clojurians (5)
- # calva (25)
- # chlorine-clover (8)
- # cider (6)
- # clj-kondo (13)
- # cljdoc (10)
- # cljsrn (1)
- # clojure (80)
- # clojure-berlin (6)
- # clojure-europe (29)
- # clojure-nl (4)
- # clojure-spec (18)
- # clojure-uk (51)
- # clojurescript (41)
- # conjure (55)
- # cursive (3)
- # datomic (58)
- # emacs (9)
- # events (1)
- # figwheel-main (2)
- # fulcro (29)
- # graphql (12)
- # helix (4)
- # jobs (4)
- # klipse (8)
- # london-clojurians (1)
- # malli (5)
- # off-topic (13)
- # portal (9)
- # re-frame (30)
- # shadow-cljs (44)
- # spacemacs (7)
- # specter (3)
- # sql (11)
- # tools-deps (71)
- # windows (1)
- # xtdb (10)
how do i clear a form input field? i'm trying (gdom/setTextContent temp-input "")
but that does not work. following this tutorial: https://www.learn-clojurescript.com/section-2/lesson-15-capstone-temperature-converter/
weird, (set! (.-value temp-input) "")
clears the input field if i do it in the repl, but not when i put it in a function in a file
never mind. it was a pebkac. i was not reloading stuff correctly because i used the atom wrong
If you’re managing the Dom yourself yeah that’s the way to go. Often cljs web apps are react based apps where the ui state is derived from the current state
hi folks, I was doing a quick tutorial on cljs+reagent, everything worked fine, but when I reload browser, it will just show “Shadow-cljs rocks!” now instead of the app. the app is started with shadow-cljs watch app
and I tried to restart this too, but it doesn’t help. any advice, please?
this is the tutorial I was following https://www.rockyourcode.com/tutorial-clojurescript-app-with-reagent-for-beginners-part-1/
@U05224H0W that’s the default content of the index.html. the <app> tag content is not being replaced by (cl)js for some reason..
breaking_bad_quotes.core.init is not a function
<script>breaking_bad_quotes.core.init();</script>
this one fails basically
the main.js returns 200, seems ok. no 404 anywhere
namespace not changed. the weird thing is it worked, but it broke down on browser refresh. watch seems to be working fine, no compilation errors.
must be something happening that breaks the loading of the code. assuming that the names are otherwise all correct.
no other errors in console. see screenshot https://www.dropbox.com/s/lcw9cy1n6appskp/Screenshot%202020-09-09%20at%2010.51.46.png?dl=0
btw the call should probably be removed entirely and use :init-fn
in your config instead
yes, it’s right underneath it.. but I didn’t really touch anything there. it’s mostly code generated by lein new shadow-cljs breaking-bad-quotes +reagent
it’s this brief example https://www.rockyourcode.com/tutorial-clojurescript-app-with-reagent-for-beginners-part-1/
I do not know what you did or didn't do. if you share the code I can probably tell you whats wrong. otherwise I'm just guessing which isn't very useful it seems.
ok gimme a sec
this is the code, I’ve been making changes only in core.cljs
and adding deps in shadow-cljs.edn
https://github.com/josefrichter/breaking_bad_quotes_test/blob/master/src/breaking_bad_quotes/core.cljs
oh I’m a fucking idiot
I was following the tutorial too literally and accidentally remove it
and was stupid enough not to realize that the init() that I’m calling is not there
@U05224H0W sorry for wasting your time, thank you for your help though!
Does the Closure compiler have a way to handle Longs? This library seems to suggest so https://www.npmjs.com/package/long. But i am not that familiar with Closure Compiler