This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-11
Channels
- # admin-announcements (8)
- # announcements (1)
- # boot (343)
- # braid-chat (23)
- # cider (20)
- # clara (5)
- # cljsrn (48)
- # clojars (5)
- # clojure (90)
- # clojure-canada (3)
- # clojure-czech (1)
- # clojure-russia (107)
- # clojure-sg (2)
- # clojurebridge (2)
- # clojured (10)
- # clojurescript (70)
- # community-development (73)
- # cursive (106)
- # datavis (40)
- # datomic (40)
- # docs (4)
- # editors (1)
- # emacs (1)
- # events (4)
- # funcool (2)
- # hoplon (46)
- # jobs (2)
- # ldnclj (11)
- # mount (8)
- # om (214)
- # onyx (12)
- # re-frame (35)
- # reagent (31)
- # spacemacs (12)
- # yada (18)
@wei: When I wrote this post, the example was a swiper component: http://blog.fikesfarm.com/posts/2015-07-24-using-react-native-components-in-clojurescript.html
@drapanjanas: are you using reagent as well?
I tried something like this now:
(map #(-> %
(assoc :animateDrop true)
(assoc :rightCalloutView [view {:flex 1} [text {} "Hi"]])) data)))))
(react native mapview annotatiosn) but it just ends up not rendering the [view] stuffinside the normal react tree it renders fine but I need to specifically pass a rendered component as property
if anyone has an idea, please ping me This is blocking me a little bit too much right now
@dvcrn try wrapping that hiccup array using a function as-element from reagent core. I use reagent in my free-time project currently finishing web part, so not working alot on mobile apps yet.
(assoc :rightCalloutView (reagent.core/as-element [view {:flex 1} [text {} "Hi"]]))
@mfikes: I was reading this RN newsletter now and I was like - hm, this project sounds familiar 😄 Nice start of the week
@donmullen: Sorry, didn’t have time to put ideas to the wiki during the weekend, will do it today
btw - I’m creating a new product and frontend part of it would be open sourced from the start: https://github.com/kapteko/frontend. It would include browser/iOS/Android clients plus win/mac versions using Electron framework. Currently almost nothing there (working on Buck as a universal build system for all of the staff currently) but in a feature I hope it may be a useful example of building staff with CLJS + RN + Om-Next
I'd really like to use cljsrn for our next mobile app, but unfortunately, since I'm the only Clojurian here, using ClojureScript for the entire app is out of the question. Is it possible to use cljsrn only for certain views, in an app that is otherwise written using Apple's and Google's development tools? If not, is it possible to use ClojureScript in parts of a regular JavaScript React Native app?
@tord: Certainly! Check those one https://facebook.github.io/react-native/docs/embedded-app-ios.html#content
It’s not actually about CLJS but here as you can see ReactNative creates just some views that you can integrate in the any place of an app
Another cool example is https://github.com/facebook/react-native/tree/master/Examples/UIExplorer, it shows how to integrate RN views inside the existed app and vice versa - integrating existing native view inside of RN app
But I would recommend it only in case you know mobile development/React Native and ClojureScript really well. Otherwise it could be a tough task to handle, not that many examples yet
@artemyarulin: Thanks! I know mobile development and ClojureScript well enough, but I've never even touched React Native. Unfortunately, it sounds like trying to use cljsrn would be too risky for me at the moment.
Well yeah, from the other side I would highly recommend implementing mobile application with React-Native.
Even without ClojureScript - once you tried it, there is no way back. It so dramatically better that native development
and later on you can add parts using cljs
for anything. Really - if you know mobile development already you know all the pains. Just spend couple of hours with React Native, play with animation get idea of a development workflow (instant refresh omg). Check how easy is to create a native module, how cool the React flow itself.
once again - react native is not all in
, you can escape to the native part for the critical parts
I'm tempted to try, but what's the safest path? Native app with some parts in RN, or RN app with some native parts?
Well, RN generates native UI at the end
I would start with RN for everything and in some cases (if there is a perf problem, or you want to have 3D or there is an external component already) I would implement RN native module to wrap it or maybe embed the native view inside RN app
are you building both iOS and android?
then there is nothing to discuss
Starting with RN for everything seems tempting, but probably also the most difficult approach to get the rest of the team on board with.
Anyway, I'll at least spend a few hours playing around with it on my own next weekend, and see how it works for me. Thanks for all the advice!
Hey @artemyarulin, I put up a repo with a Tab Bar integration example. I have an issue with the navigator, I explained everything in the README. Can someone take a look and help me make it work ? https://github.com/gphilipp/cljsrn-tabbar-demo
@mjmeintjes: saw boot-react-native today, looks super interesting
this looks great as well, for starting an app in the simulator without opening XCode: https://github.com/facebook/react-native/pull/5119/files
@pesterhazy I’m now playing (well actually moving all the existing projects) to https://buckbuild.com, which has all of those staff. It support unified way of dealing with actually any projects, but by default it can do:
buck build
- build the project, iOS, Android. Or any custom using your own scripts
buck test
- same but for testing
buck run
- deploy the project to the device/emulator.
Internally FB team is using Buck already for RN and they working on releasing it support to the open source in a feature. So if you have to deal with multiple project (iOS/Android/browser/backend/etc) all the time - I highly recommend checking this
@artemyarulin: interesting, will check it out
I'm keen to build iOS cljsrn apps with a simple, reproducible command, ideally without an xcode project
exactly
I was building hello world with simple buck build
command and it took for me 3 second to build iOS version and 0.8(!) second for the android. My XCode starts like 5 second only
you got me curious
and after I changed HelloWorld text it took 0.1s to rebuild the project. I was like - RLY?!
you can also check bazel from Google. Both systems share a lot of ideas (and code actually)
I decided to go with Buck, cause Facebook, React, etc.
@artemyarulin: so you are triggering all cljs builds as well from Buck?
@donmullen: I’m planning yes. You can always wrap anything with genrule
and sh_test
like here https://github.com/kapteko/frontend/blob/master/blog/BUCK
The cool thing in BUCK that you can do a lot of staff programatically - right now I’m working on a rule for om-next component. So at the end each component folder would contain only one [component-name].cljs
(and related styles, localization, etc.) and BUCK build then do all the rest
and by rest I mean building JAR with all deps, building JS files if needed for later references or maybe just composing cljs
as a part of other module