This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-15
Channels
- # aleph (14)
- # aws (5)
- # beginners (144)
- # bitcoin (1)
- # boot (14)
- # chestnut (13)
- # cljs-dev (58)
- # cljs-experience (1)
- # cljsrn (47)
- # clojure (107)
- # clojure-dev (9)
- # clojure-finland (12)
- # clojure-gamedev (4)
- # clojure-russia (2)
- # clojure-sanfrancisco (1)
- # clojure-spec (5)
- # clojure-uk (28)
- # clojurescript (34)
- # cursive (9)
- # datomic (3)
- # emacs (11)
- # garden (16)
- # graphql (9)
- # hoplon (3)
- # jobs (2)
- # juxt (6)
- # off-topic (32)
- # om (10)
- # onyx (1)
- # pedestal (4)
- # proton (1)
- # re-frame (14)
- # reagent (8)
- # ring (1)
- # ring-swagger (34)
- # shadow-cljs (19)
- # sioux-falls (1)
- # spacemacs (16)
- # testing (14)
basically it comes down to: throw a bunch of RAM onto it… then it finishes in <5 minutes for me on a modern MBP… I use :advanced cljs, the output ~1.6MB index.ios.js
@petterik @vikeri the hack I posted might be of interest for prod/:advanced compilation … lmk your thoughts
Has anyone here used FlatList in cljsrn? Or how do you recommend implementing a 3xN grid of photos?
I’ve tried implementing the FlatList examples from RN in cljs, but I’m getting cryptic errors
I’m trying to put a 3xN photo grid in a scroll view, am I overthinking this? Should I just use for
inside of the scroll
?
if this will ever be anything longer than the screen height, you really need to use VirtualizedList, etc
here’s a gist that I did some time back how to use VirtualizedList from ClojureScript, hope it helps
haven’t had the need for FlatList myself, but I think it just adds extra features which you can relatively easily achieve with the base VirtualizedList
re: do you need it - yes, otherwise the memory goes through the roof and your app will crash, even on the latest devices
depends on the size of the images also, but overall just looping views that will always stay mounted is not a sustainable approach for anything past 1x screen height
I basically started in mobile dev with React Native and one thing that was surprising to me: 500KB image does not take 500KB of ram, it takes WAY more
this is it’s not specific to RN, all of iOS works like that (I’m not sure about the low level explanation why)
@psdp: I am for a side project. @mv: Same benefits that expo
provides over normal react-native
— you don’t have to deal with the native sides of things and can just focus on writing code that works for both platforms. Also, testing code on device is much easier (as is sharing demos with testers), there’s built in ability to skip the app stores for upgrades (as it’s just javascript), built in push notifications, built in crash reporting (via Sentry), and in general a simple API for most needs.
There’s very little downside as you can “eject” your project to a normal react-native project if later on down the road you decide you need native code. So basically, a walled garden starting point.
@seantempesta a side project… aren’t you the author?
Author of the expo template. But @psdp asked who is using it, so I thought I’d answer for what I’m using it for. 🙂
Can you speak to any of the components that expo doesn’t implement that people might miss?
Cool. Let me know what you think?
You mean what third party components do I like?
Looking at my package.json file, it looks like these are the only third party packages I’m using that didn’t come from react-native or expo.
react-navigation
(which I wrote a cljs wrapper for), react-native-communications
, react-native-radio-buttons
, react-native-timeago
Ooph. Clojurescript, Javascript, React Native, now Expo. It’s hard to tell where to start looking at docs when you want to implement something
Well, think of expo as just a react-native library. When you run exp
or use XDE
it’s just starting the react native packager. And all clojurescript is doing is compiling down to the main.js
file which is then read by the react packager.
It’s confusing at first, but you’ll get the hang of it. 🙂
@seantempesta is there an example app anywhere that uses this template? So far there don’t seem to be any uses of Expo in the template…
@mv: not sure what you mean? Like examples of using the expo api specifically?
I have a demo app showing navigation using expo on my cljs-react-navigation library