This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-05
Channels
- # aws (1)
- # beginners (57)
- # boot (3)
- # cider (6)
- # clara (49)
- # cljs-dev (47)
- # cljsjs (23)
- # clojure (144)
- # clojure-dev (2)
- # clojure-finland (1)
- # clojure-germany (1)
- # clojure-sg (1)
- # clojure-spec (25)
- # clojure-uk (245)
- # clojurescript (39)
- # core-async (3)
- # cursive (6)
- # datomic (117)
- # emacs (3)
- # fulcro (6)
- # hoplon (10)
- # jobs (7)
- # juxt (5)
- # leiningen (11)
- # om (27)
- # pedestal (4)
- # perun (2)
- # re-frame (22)
- # reagent (35)
- # ring-swagger (11)
- # shadow-cljs (333)
- # spacemacs (10)
- # specter (10)
- # sql (20)
- # vim (8)
hi all, im just getting started w/clojure, interested in making a react native app. does anyone have any snippets/public code showing an example of successfully integrating Native-base (cross-platform RN components)?
hi @ahorwitz http://cljsrn.org/ is worth checking out if you’ve not come across it already.
@ahorwitz: I would separate "getting started w/ clojure + react" from "react native" -- clojurescript + reagent is amazing; react-native may bring unnecessary headaches early on
thanks @amar, thank you! actually just stumbled across that, that's how i found this slack 🙂
will give it a more thorough read. @qqq that's good to know; is it still a headache with something like exponent involved?
@ahorwitz: 1. I never tried exponent. 2. The two things that turned me off from react native were: 2.1: debugging cljs is so much easier in browser 2.2: I needed something simple (camera access?) it required compiling some module for ios -- took up an afternoon, and after that, I quit react native
also, hot code reloading, in my limited experience, worked much better in browser than over react native
ahh, that's good to know, thanks. supposedly exponent makes the hardware stuff easier, but i've never used it, guess we'll find out 🙂
i found an example with nativebase here https://github.com/jigkoxsee/exp-cljs-native-base/blob/master/src/cljs_native_base/core.cljs, im guessing if you're using reagent without react native you don't have to bother with r/reactify-component adapt-react-class etc. too
cljs tooling with boot/lein figwheel/reload is amazing; and if you start with react native upfront, you may end up in a react-native tarpit and never realize how fun cljs dev could be
https://www.youtube.com/watch?v=j-kj2qwJa_E // author of figwheel
https://www.youtube.com/watch?v=G7Z_g2fnEDg // he also wrote devcard, which I don't use, but some people absolutely love
in 1.9.946
, apparently an assert got added about the form of :npm-deps
: Assert failed: cljs.analyzer/foreign-dep? expected symbol got "@material/ripple"
cljs supports string requires, because not all npm packages fit in clojure's symbol syntax. how is this supposed to fit with the dependency syntax?
anyone know if there is a good reason clojurescript requires explicitly requiring namespaces for functions that you fully qualify? e.g., using (clojure.string/starts-with? ...)
requires requiring [clojure.string]
@isak so the compiler can properly ensure that clojure.string
is loaded before you want to access it
Perhaps a secondary reason, @isak, is that if you have a qualified symbol, the compiler wouldn’t know if the part before the /
is a namespace, or simply an alias, otherwise.
i don't understand the distinction here, when does clojure care whether you're using an alias or not?
it does not? I have a one namespace (ns repl)
which should be usuable from any namespace but isn’t
Yeah, my point above is that the part of a symbol before the /
is not necessarily a namespace (even if it has .
characters in it). I think I'd like to say that Clojure doesn't have the concept of fully qualified symbols that can be used to unambiguously resolve a Var. Symbols are qualified, and symbol-to-Var resolution is accomplished using whatever is in the ns
forms, including aliases.
In Clojure, the important thing is not the ns
form, but the state of the Namespace object in the Clojure runtime, particularly the one referred to by *ns*
. That state is modified as a result of ns
, but can also be modified lots of other ways (a bare require
or alias
, etc).
@alexmiller does using those other ways (e.g., bare require
) come with any problems for clojurescript and advanced compilation? Also, is it possible to call a macro to modify *ns*
?
the reason I ask is that for some types of projects, it is nice to be able to maintain a set of requires/imports that can be reused across namespaces. Elixir allows this, and I haven't figured out how to do it (if possible) in clojurescript. Example: https://medium.com/@cjbell_/sharing-methods-between-phoenix-controllers-358ab6d36e22