cljsrn 2021-09-04

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

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

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/

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

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

Fantastic — thanks! Noted all of this to dive deeper

👌 1

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

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.

Thank you, still work in progress.

It’s mostly CLJS + RN.

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.

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

I thought you needed to do js worklets

and I didn't know that was possible in cljs

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

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

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

❤️ 1

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

👍 2

Cool. Thanks for sharing!

👍 1

Though Replete doesn't use RN if I recall

Right, Replete doesn't use React Native

The request was not about RN, though.

Cant’ wait to try — thanks ya’ll!