This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-09
Channels
- # announcements (5)
- # beginners (53)
- # clj-kondo (4)
- # cljdoc (3)
- # cljs-dev (11)
- # cljsjs (1)
- # clojure (59)
- # clojure-europe (15)
- # clojure-italy (6)
- # clojure-nl (9)
- # clojure-spec (22)
- # clojure-uk (26)
- # clojurescript (16)
- # clojutre (6)
- # cursive (27)
- # datomic (34)
- # duct (1)
- # figwheel-main (2)
- # fulcro (12)
- # graphql (14)
- # jackdaw (9)
- # jobs (1)
- # kaocha (4)
- # luminus (1)
- # off-topic (11)
- # pathom (1)
- # pedestal (2)
- # re-frame (6)
- # reagent (10)
- # ring-swagger (34)
- # shadow-cljs (47)
- # spacemacs (21)
- # sql (3)
- # tools-deps (37)
- # uncomplicate (11)
- # vim (17)
can someone tell me in this example: https://github.com/reagent-project/reagent/blob/363f2d4976ac077a289d7a5d46d41a22e15d723c/examples/material-ui/src/example/core.cljs#L4
(:require [reagent.core :as r]
["@material-ui/core" :as mui]
what’s the @
for?Symbols can be used for npm modules, so long as a legal symbol can be used. Strings are sort of an "escape hatch" when symbols can't be used to identify a library. (This could be thought of as a general thing, not specific to npm.)
As an illustrative example, it is perfectly fine to (require '"clojure.zip")
in a REPL.
@mfikes I saw https://gist.github.com/mfikes/9fc981ed7a190b8e9b2912eee98fdd5e. Is there some way to deal with bigints today without using something as drastic as a cljs fork? I'm using cljs-ajax to get edn and the reader rounds my large integers
Sure, you could just use regular JavaScript interop. That gist is an experiment to see what it might mean to have them "integrated" into the language. But there is nothing stoping you from using them via interop today.
Maybe use transit with custom handlers for bigint