Fork me on GitHub
#cljsrn
<
2018-03-20
>
grounded_sage11:03:39

Has anyone used React Native for Web?

grounded_sage12:03:30

I feel like a total noob asking. But how can I use it in Cljs?

grounded_sage12:03:57

I'm trying to require it into a bare bones Boot build and I can't seem to figure out how to get it to work.

grounded_sage12:03:46

Have you used it successfully inside of cljs build? @pesterhazy

pesterhazy12:03:47

it has the virtue that it will work (because it uses the code path that tens of thousands of other programmers users)

pesterhazy12:03:14

what do you mean by cljs build?

grounded_sage12:03:24

Like used it successfully from cljs?

pesterhazy12:03:33

yes of course! Works great

grounded_sage12:03:54

Awesome. It looks like a fantastic project. Was surprised to not see a blog about it 😮

pesterhazy12:03:55

I bracket the whole npm-deps logic and just use webpack to build a 2nd bundle

pesterhazy12:03:27

and then use js/ReactNativeWeb or whaterver; problem solved 🙂

pesterhazy12:03:17

I have a twin project that works on RN and RNW with (almost) no code changes

pesterhazy12:03:21

pretty magical

pesterhazy12:03:57

I mean it's not a fantastic interface for the web (with all the TouchableOpacity) but it's great for a number of use cases (like testing)

grounded_sage12:03:24

Yes I am curious as to your experience with it? Think it's the way forward? I've watched a couple of talks and am pretty convinced and wanted to give it a go.

grounded_sage12:03:35

I thought I would just be able to dive in but got a bit stuck. Kind of glad to find that it's still a hairy problem with NPM dependencies and it's not just me. But at the same time I kind of wish it all worked without needing Webpack 😛

grounded_sage12:03:47

@pesterhazy are you using all inline styles? Or StyleSheet.create?

pesterhazy12:03:32

only inline styles

pesterhazy12:03:06

honestly not sure what the point of StyleSheet.create is

pesterhazy12:03:20

(maybe I'm missing something there)

pesterhazy12:03:45

one cool thing about RNW is that you can just mix in regular React components

pesterhazy12:03:51

also it works without issues with Reagent

grounded_sage12:03:58

I'm particularly interested in the atomic styles https://github.com/necolas/react-native-web/blob/master/website/guides/style.md#implementation-details I was attempting some of this a while ago with my server side rendered / SPA hybrid websites I built in Rum. But got tripped up with all the macros and JVM + Google Closure build pipelines mangling the classnames.

jeaye21:03:16

We recently launched our website, promoting our cljsrn app! https://okletsplay.com/

😮 4
metal 4
4
rboyd16:03:17

looks great!