This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-17
Channels
- # beginners (47)
- # boot (1)
- # calva (18)
- # cider (16)
- # cljs-dev (6)
- # cljsrn (14)
- # clojure (46)
- # clojure-dev (6)
- # clojure-italy (3)
- # clojure-sweden (2)
- # clojure-uk (1)
- # clojurescript (21)
- # css (1)
- # data-science (1)
- # emacs (2)
- # figwheel-main (2)
- # graalvm (11)
- # leiningen (3)
- # nrepl (19)
- # off-topic (1)
- # pathom (4)
- # re-frame (17)
- # reagent (4)
- # shadow-cljs (49)
The atom has is a reference object so will have the same identity and not cause re-render. I think I use into-array with a cljs vector
Is there a method to import npm
package? I was truing to use npm-deps
, libs
and foreign-libs
in project.clj
but none of those keys helped me I can't require package in core.cljs
I strongly recommend shadow cljs
Really helps the npm deps story
Check out the reagent shadow and expo demo for example
oh okay but if smb knows method how to do this with React Native and figwheel I'll happy to learn 😄
It depends. Usually add the lib to your package.json, run yarn install or npm install then require it in code using js/require <lib> You might need to add it to some other file depending on how your setup
I tried to do so with several packages and every attempt ended up with error Unknown named module
in metroRequire
😕
which npm module? i've used several. u are using re-natal right? so usually you follow the stops for the npm package then https://github.com/drapanjanas/re-natal#manually-registering-dependencies-with-use-component-command
@U45SLGVHV oh, I did know about that, thank you for the link, I my goal was to require @mauron85/react-native-background-geolocation
, but with my attempts I failed even with requiring some basic libs. Btw how would you require this module in cljs? The name starts with spec char 😕
(def geolocation (js/require "react-native-background-geolocation"))
and then if u need class from it
(def abc (r/adapt-react-class (goog-obj/get geolocation #js ["abc"])))
damn u are rich if u can pay for that module 😄
why not use others like 'geolocation' or react-native-geolocation-service
?
@U45SLGVHV oh man, I did not even try to use paid module, I was going to use free version from @mauron85
😄