This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-11
Channels
- # announcements (1)
- # beginners (67)
- # calva (4)
- # cider (6)
- # clj-kondo (26)
- # clojure (61)
- # clojure-belgium (2)
- # clojure-sweden (1)
- # clojurescript (12)
- # community-development (27)
- # cursive (2)
- # datascript (4)
- # datomic (20)
- # emacs (4)
- # funcool (1)
- # graphql (11)
- # honeysql (3)
- # malli (15)
- # membrane (6)
- # nbb (4)
- # nextjournal (7)
- # pathom (8)
- # polylith (7)
- # rdf (1)
- # re-frame (1)
- # releases (2)
- # shadow-cljs (42)
- # specter (3)
- # tools-deps (25)
- # xtdb (17)
It's been a few years since I f'd with ClojureScript. I'm not very good with JavaScript but I do use it at work. If there's a npm module i want to f around with and I want to start it as a cljs project, what's the state of the art for doing that?
Figwheel https://figwheel.org/docs/npm.html Shadow-cljs https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages Vanila: https://clojurescript.org/guides/webpack A blog post about project setup: https://curiousprogrammer.dev/blog/how-can-i-create-a-clojure-script-web-app-from-scratch-with-reagent-and-npm/
npx create-cljs-project foo-test
cd foo-test
npm install foo
npx shadow-cljs browser-repl
(require '["foo" :as x])
(x/fAround)
I'm in need of a rich, full-featured datatable library. Something like https://ag-grid.com. I'm curious if a similar library is available for Clojurescript? I understand interop is an option, but if there's a more native implementation I'd like to know.
for something like that, interop is the way to go. the justification to build one in CLJS is just not there if you can use one of these best in class libraries from JS
You'll especially want interop for a table where performance matters. For ag grid I ended up bypassing reagents call to clj->js conversion to optimise the arguments myself.
I am trying to simulate a keypress. I am trying in cljs
(elem.dispatchEvent (new js/KeyboardEvent "keypress" #js {:key "a"}))
in js
document.getElementById("65").dispatchEvent(new KeyboardEvent('keypress', {key: "a"}));
and neither of them works. Not sure what is the issue here. I am using re-frame, if that makes a difference.