Fork me on GitHub
#cljsrn
<
2018-02-20
>
Kara04:02:53

Has anyone tried implementing https://wix.github.io/react-native-navigation/ using re-natal? I seem to be running into issues with it, but I'm very new to all this so it might be user error... I was looking at https://github.com/madvas/catlantis/blob/master/src/catlantis/shared/navigation.cljs for reference... but this seems like a lot of overhead, and I was hoping for a more simple implementation for a tab based app.

joshmiller16:02:19

@kara I’ve done it, and it can be a lot simpler than that

joshmiller16:02:20

I’m looking to see if I have a public example somewhere…

joshmiller16:02:20

Hm, doesn’t look like I do, but let me know if it’s still something you’re trying to get running and I can adapt some example code from a private repo to show you. I ran into the same thing when I started with it, that that was way too intense for what I needed, but you can use react-native-navigation in cljs with like a dozen lines of code instead.

Kara20:02:33

If you wouldn’t mind putting together a basic example and could share it in a public repo I’d really appreciate it... I felt like “a dozen lines of code” should be closer to what I need, but I’m also still learning cljs so I’m still tripping over syntax 😐 I’d really prefer the native integration if I can vs a pure js solution like react navigation @U0E1JV8GK

rboyd16:02:46

@kara I've had decent success with https://github.com/seantempesta/cljs-react-navigation maybe check it out if you haven't already

frankiesardo17:02:47

anyone managed to run clojurescript tests with Expo?

frankiesardo17:02:08

As soon as I touch code that refers to Expo I get:

frankiesardo17:02:28

/Users/.../example/node_modules/expo/src/Expo.js:3
import './Logs'; // set up Expo logging infra
^^^^^^
SyntaxError: Unexpected token import

frankiesardo17:02:23

My understanding is that I might need to set up preprocessing but do I need to preprocess the entire node_modules folder?

frankiesardo20:02:57

@vikeri I saw your talk and the part about testing https://www.youtube.com/watch?v=6IYm34nDL64&amp;feature=youtu.be&amp;t=9m3s but I didn't find a way to run simple tests using clojurescript. I was planning to use https://github.com/facebook/react/tree/master/packages/react-test-renderer to check the output of my components. Any advice on this?

vikeri21:02:41

@frankie what we've done is to mock out all rn specific things and then just run our tests in node. Pretty convoluted setup but very nice once it's working. Wrote some UI tests in the beginning but since using re-frame we haven't had a single UI issue the past 1,5 years so not writing any UI tests anymore. Just testing the business logic with unit tests and generative spec tests

frankiesardo07:02:48

Makes sense, thanks!

rboyd21:02:42

what's the highest version pair people have had success with expo+reagent? expo 25 + reagent 0.7.0 seems to have some issues. loading fonts fails, something to do with new create-react-class in react 16 I think