Fork me on GitHub
#cljsrn
<
2020-06-04
>
Oliver George00:06:18

I've create a set of reusable wrappers for some RN libs we use. https://github.com/condense?q=cljsrn

👍 28
Oliver George00:06:41

With Krell you can include one of these deps then use clj -m cljs.main --install-deps to have the necessary node deps added to package.json

Oliver George00:06:10

Principles were... 1. No need for direct interop outside the api. (so your logic shouldn't end up littered with #js .- or even .) 2. Minimise opinions 3. Aim for idiomatic CLJS usage 4. New ns for breaking changes 5. Include comments allowing REPL based checks of core functionality

Oliver George00:06:25

With RN62 the setup side of using RN libs is greatly improved.

Oliver George00:06:39

A set of these types of interop libs could reduce friction for CLJSRN users.

lepistane11:06:17

has anyone made https://github.com/day8/re-frame-http-fx work with react native? i am looking at it and it seems that cljs-ajax is the problem how do i got about this?

frankitox12:06:21

You tried to use it and didn't work? Because I'm using https://github.com/day8/re-frame-http-fx/blob/master/src/day8/re_frame/http_fx.cljs#L86 without any trouble right now

frankitox12:06:24

I still defined my own fx (as in the article dotemacs sent) in case cljs-ajax breaks in some edge case, then I can modify the code in only one place.

lepistane13:06:03

yep i tried and it didn't work i was getting error related to xhrio but can't find it now to share with u i've implemented custom fx and it's working great.

frankitox14:06:51

Now that I think about it I had to do https://github.com/JulianBirch/cljs-ajax/blob/master/docs/faq.md#react-native-why-does-bundling-fail-on-my-compiled-project. But I still did not test in a production release. Glad to hear you solved it :thumbsup:

lepistane14:06:10

oh this is a good find i will see if i have some time bit later to experiment with it maybe this fixes the issue thanks for the link

lepistane11:06:54

oh this just made my day thank you so much