I've create a set of reusable wrappers for some RN libs we use. https://github.com/condense?q=cljsrn
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
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
With RN62 the setup side of using RN libs is greatly improved.
A set of these types of interop libs could reduce friction for CLJSRN users.
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?
https://increasinglyfunctional.com/2019/06/25/http-fx-for-re-frame-on-react-native.html
oh this just made my day thank you so much
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
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.
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.
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:
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