This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (2)
- # beginners (150)
- # calva (59)
- # cider (10)
- # clj-kondo (63)
- # cljs-dev (15)
- # cljsrn (34)
- # clojure (127)
- # clojure-dev (16)
- # clojure-europe (12)
- # clojure-italy (18)
- # clojure-nl (6)
- # clojure-russia (3)
- # clojure-uk (23)
- # clojurescript (18)
- # clojutre (15)
- # clr (2)
- # cursive (3)
- # datomic (26)
- # duct (6)
- # fulcro (9)
- # graalvm (3)
- # joker (9)
- # lambdaisland (1)
- # off-topic (12)
- # om (1)
- # pathom (29)
- # re-frame (16)
- # reagent (2)
- # shadow-cljs (57)
- # slack-help (2)
- # spacemacs (45)
- # sql (20)
- # xtdb (3)
- # yada (3)
@xfyre Have you worked with reagent before? This guide could give you more insight: https://github.com/reagent-project/reagent/blob/master/doc/InteropWithReact.md
Also, has anyone thought about if inline requires would help us out with ClojureScript apps? http://facebook.github.io/react-native/blog/2019/03/12/releasing-react-native-059#faster-app-launches-with-inline-requires
shadow-cljs in theory supports this. I just haven't found someone yet to actually use it in practice 😉
it lets you split your code into multiple "chunks/modules" that can be loaded "lazily" via
pure data can just be inlined directly via https://clojureverse.org/t/using-none-code-resources-in-cljs-builds/3745
Ok nice, I’d have to define the different modules manually then? It seems the metro feature does this automatically
Ok I see. I define the modules and RN detects when they are used and handles the lazy loading?
no clue about the second part. I haven't tested that yet. shadow-cljs just creates multiple
.js files instead of one. How you load them is then up to you/RN. So if you load it in some componentWillMount or whatever lifecycle event it could be lazy
Nice, yeah we’re still on re-natal. But interesting to know that this would be a good way to improve performance.
@vikeri Of course. I managed to create HOC easy enough, but I’m still facing some weird issues I can’t properly explain.
I'd like to include a datascript database in my app to save loading data from the network. I see that (js/require "./blah/data.json") works but it returns JS objects/arrays which kind of gets in the way of using transit format and desearializing.
at the moment, we bundle data as json files, but save data to async storage in strings made with transit
How are you testing cljs react-native apps? I'm trying to understand the options and tradeoffs.
@mynomoto We only test business logic (never have any UI bugs thanks to re-frame + spec). We mock out everything RN specific and then we run the tests in nodejs.
My experience is that if you put all business logic in the subscriptions and then make sure they adhere to a spec you will catch 99% of the issues. The issue is usually that the subscription doesn’t return what you expect it to return
@vikeri I will take a look, thanks. What worries me most about the ui is having broken state in which something should be rendered but isn't because of a typo. I don't want much from the ui tests but that would be nice to have.
I think once we’ve got it working and integrated with ci it will start adding value, but it’s a hard slog atm with little payoff