This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-26
Channels
- # asami (2)
- # babashka (1)
- # beginners (31)
- # calva (11)
- # clj-together (3)
- # clojure (43)
- # clojure-europe (6)
- # clojure-norway (1)
- # clojurescript (14)
- # core-async (3)
- # core-logic (24)
- # cryogen (6)
- # datascript (2)
- # datomic (3)
- # fulcro (35)
- # honeysql (2)
- # hyperfiddle (12)
- # kaocha (3)
- # lsp (11)
- # off-topic (10)
- # pathom (2)
- # reagent (14)
- # releases (1)
- # sci (11)
- # shadow-cljs (27)
- # tools-deps (7)
I am importing a React component bundled as a ES module. It has a single default export, which is the component itself. Is there a more elegant way to import the component than the following?
(:require ["some-component" :refer (default) :rename {default SomeComponoent}])
At least with shadow-cljs, you can use ["some-component$default" :as SomeComponent]
.
How can you remove the ‘#’ symbol from a reitit router URL? I tried passing {:use-fragment false}
into rfe/start!
. That works when navigating using the links within the app but not when using the URL directly ( E.g, navigating from the address bar of a browser)
> E.g, navigating from the address bar of a browser
If it's the initial loading of a web page (i.e. you open a new tab and enter the URL), then it's the server responsible for that routing and not the frontend.
You can route all requests to /index.html
and let reitit take it from there though.
Hey All, I try to implement phone number validation in my code. so the user will type his phone number and I will validate it before moving to the next step. I'm using #shadow-cljs and I tried to use the phone-number library (https://github.com/randomseed-io/phone-number/ I follow the instruction, and add the dependency as required but found the message "The required namespace "phone-number.core" is not available" Did anyone try to use this library before? any solution?
Thanks! Do you have any recommendations for libraries that support Cljs?
There's probably plethora of JS libraries that you can install via NPM and use via JS interop from CLJS.
Hey All. I try to use this library: [cljsjs/libphonenumber "8.10.18-0"] to implement phone number validation in my code. I add it to the #shadow-cljs file but it's not working. Did anyone use it? any idea? https://clojars.org/cljsjs/libphonenumber
shadow-cljs does not support cljsjs packages. just use the npm package directly instead. npm install libphonenumber-js
then (:require ["libphonenumber-js" :as x])
in your ns
Thank you @U05224H0W!