Fork me on GitHub
#cljsrn
<
2021-09-04
>
stopa19:09:22

Tried — fast!

stopa19:09:01

Wow, looks great!

raspasov04:09:29

Thank you, still work in progress.

stopa17:09:12

Question: what is the setup you went with? Krell, Shadow, expo or not?

raspasov20:09:16

I build from XCode/AppCode, do not use the expo managed workflow stuff (have never tried it). I have some native Swift code related to the camera/video frame processing. But 100% of the UI is ReactNative/CLJS

raspasov20:09:04

Expo bare workflow allows you to use their libraries which are nicely made in most cases, for example https://docs.expo.dev/versions/v42.0.0/sdk/devicemotion/

raspasov20:09:25

Also, react-native-web also works with expo bare, more or less out of the box

raspasov20:09:23

I made https://www.autorep.app (a very simple landing page) just to give it a try, worked well

stopa20:09:18

Fantastic — thanks! Noted all of this to dive deeper

👌 2
raspasov20:09:53

Happy to help. What are you thinking of building with RN?

stopa20:09:12

https://consistent.fit Think “Noom”, but for getting six-pack abs ^ Right now, we have a PWA, and a slack bot. Really want access to notifs / integration with health, so think it’s time to move into native app.

raspasov08:09:13

It’s mostly CLJS + RN.

raspasov08:09:37

All animations that you see in the app are triggered on the React Native side. It uses a combination of :useNativeDriver true and reanimated-v2 animations.

danielneal12:09:50

ooh i'd be interested to hear how you did reanimated v2 from clojure

danielneal12:09:04

I thought you needed to do js worklets

danielneal12:09:12

and I didn't know that was possible in cljs

raspasov12:09:44

Yeah, I didn’t 🙂 I have a tiny React view written in JS which I mostly configure from CLJS

raspasov12:09:12

It’s effectively just a shim… in order to be able to use things like useAnimatedStyle, etc.

raspasov12:09:49

This is the entirety of my JS code related to reanimated v2. There’s not much context, but hopefully you get the idea https://gist.github.com/raspasov/d42656703b6d0c4e000ee83a82369b71

❤️ 2
raspasov12:09:40

I use React’s useImperativeHandle in order to expose a component :ref which I access from the CLJS side so I can call the function moveBox , for example

👍 4
pez14:09:25

Cool. Thanks for sharing!

👍 2
dnolen14:09:24

Though Replete doesn't use RN if I recall

mfikes14:09:26

Right, Replete doesn't use React Native

pez15:09:13

The request was not about RN, though.

stopa19:09:57

Cant’ wait to try — thanks ya’ll!