This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-23
Channels
- # aleph (14)
- # announcements (2)
- # babashka (8)
- # bangalore-clj (2)
- # beginners (66)
- # calva (8)
- # cider (1)
- # clj-kondo (24)
- # cljdoc (3)
- # cljs-dev (3)
- # cljsrn (2)
- # clojure (197)
- # clojure-europe (1)
- # clojure-india (5)
- # clojure-italy (4)
- # clojure-nl (27)
- # clojure-uk (18)
- # clojurescript (56)
- # code-reviews (19)
- # core-async (86)
- # cursive (16)
- # data-science (1)
- # datomic (16)
- # docker (3)
- # events (1)
- # fulcro (101)
- # graalvm (7)
- # graphql (16)
- # jobs (1)
- # jobs-discuss (6)
- # kaocha (4)
- # luminus (1)
- # off-topic (93)
- # onyx (3)
- # pathom (9)
- # planck (2)
- # re-frame (8)
- # reagent (3)
- # reitit (3)
- # remote-jobs (3)
- # shadow-cljs (21)
- # test-check (3)
- # tools-deps (21)
- # vim (16)
Hey, how can I import only a library inside a module ?
I am trying to use highlight.js
and they suggest doing
import hljs from 'highlight.js/lib/highlight';
import javascript from 'highlight.js/lib/languages/javascript';
but I don’t know how to translate these in my :require
(I am using shadow-cljs
in case that makes a difference)@thomas.ormezzano see the translation table here: https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages
ok so I actually initially tried
(:require [highlight.js/lib/highlight :refer [hljs]])
but was getting Invalid symbol: highlight.js/lib/highlight
Does someone have an example of using a react virtualized Table in CLJS / reagent for a recent version? I found @pesterhazy's example here: https://gist.github.com/pesterhazy/10b4a01908e7632825a2321c06130989, but I'm not sure how up to date it?
hi. How to parse .-onerror js/window
last argument? if prints like this
#object[Error Error: No protocol method IDeref.-deref defined for type undefined: ]
are you asking what that error means? what would you parse it to? you are calling @foo
when foo
is nil
or undefined
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
Hello. In my project (originally figwheel-main
one) I've added cljsbuild
and am trying to compile CLJS for production. When I'm doing lein cljsbuild once min
nothing seems to happen and it just exits silently:
➜ ai-system git:(master) ✗ lein cljsbuild once
Warning: implicit hook found: lein-environ.plugin/hooks
Hooks are deprecated and will be removed in a future version.
Compiling ClojureScript...
➜ ai-system git:(master) ✗
Can I make cljsbuild
anyhow be more verbose and provide some debug information?
Ah sorry, just noticed that actually :min
option exists in Figwheel-main as well
how to trigger window.onerror = function(message, source, lineno, colno, error) { ... }
? if I throw in console it does nothing...
How is Graphql exp. for cljs? I know there is re-graph
which didnt get update for couple of months and a recent apollo
integration example repo (which felt like just using js is better). My backend is hasura genrated graphql api so cant utilize Fulcro etc.
@cakir-enes here is an example of using fulcro, pathom, and hasura https://github.com/codonnell/crudless-todomvc
Little bit dated since it uses fulcro 2 instead of 3 but it's perfectly possible to do.
if you’re already using re-frame, then re-graph can be nice. apollo would be my suggestion as a more a la carte solution
one thing that is still missing in CLJS land that I see in JS is the ability to auto-generate code based on a graphql backend
pathom is a library that is specifically building support for GraphQL in a more Clojure-native way of writing queries, but I’m not sure about the value add tbh
not sure what you’re looking for if the apollo example wasn’t convincing for you, though
@cakir-enes You can front the graphql API with Pathom to easily integrate it with Fulcro
Have been banging my head against the wall trying to get the CLJS AST for (map inc (range 10))
Anyone know how to go about it?
Take a look at analyzer tests in ClojureScript source
thanks, I did put couldn't find anything useful. However I found this and it's sufficient for my needs: https://swannodette.github.io/2015/07/29/clojurescript-17
document.getElementById("myAudio").load();
looks like what in cljs?
(-.load (. js/document (getElementById "kana-audio"))))
is not doing the trick ;x
oh it was just .load xD
I need to traverse hiccup structure. I used https://github.com/cjohansen/hiccup-find before, but I think it has some small limitations (I don’t remember exactly what it was), can anyone suggest anything better?
Specter? Maybe
I've done quite a bit of extracting data from hiccup with meander. Simple example: https://github.com/noprompt/meander/blob/epsilon/doc/cookbook.md#webscrape-html You can go to #meander for help you decide to go that route
I have coworkers here, stop revealing my secret plans. They won't be able to resist if they don't see it coming
Yes it is