Fork me on GitHub

Just a heads up for CLJS+RN fans: over the weekend I got Matrix driving RN thanks to #helix, as far as a proof of concept and maybe half the slick macro-fication it needs for easy coding. I hope to put up a WIP repo next weekend. This package would then be CLJS+RN+transparent dataflow, without Reagent.


what’s Matrix? not an easy thing to google 🙂

☝️ 2

This the best of many Matrix write-ups, code pens, fiddles... :


Interesting, I’ve been looking for new state management solutions since deciding that I really don’t like reframe/reagent much anymore, I mean they are great and do the job mostly, but there are issues.. I’ve been playing with Helix + for smaller projects and was thinking of using something like for big projects, but haven’t really put much time into any real research. I am a bit turned off by heavy macro usage though, its not a deal breaker but it makes things harder to learn and debug


re-frame rocks if one likes setting up state/event domino chains manually, perhaps for a greater sense of control over what is happening. Libraries like MobX and Matrix go the transparent route, which can indeed be disconcerting; at first it feels like giving up control. A good analogy might be manual vs automatic memory management. The latter took a long time to gain acceptance outside of Lisp, not because folks doubted the automatic GC, but because it just gave them the willies. Creatures of habit we are. Reagent feels more like Cells to me, but it suffers from glitches. They do not break things very often, but why go there when glitch-free solutions are available? And even if the glitches were fixed (it is non-trivial), with Reagent we are still manually arranging the state/event dominos. Libraries such as MobX and Matrix discern the signal graph automatically by tracking dynamic state access. As for not liking macros, you can certainly code Matrix without them. I myself am not comfortable with "magic" until I understand what is going on, and macros do hide the mechanics. I think after about a day of coding you will be writing your own macros, but that is not a bad sequence.


Hi, I am interested in turning my mostly web-based (cljs/html) application into an iOS application... Is there some sort of guide I ought to be aware of?


Are you Ok with Cordova? That will take an HTML-oriented app to mobile. If not, you just have to port from HTML to RN JSX and styling and use or sth


Cordova... I will have to check it out. Thanks for the link 🙂


We develop/test in our local browser, ship to ChromeBook or iOS, @U3ES97LAC. Mind you, it is PITA deploying to iOS, but that is a given.


Except for putting it inside an iOS WebView, “turning” or “converting” a web-based HTML app into an iOS application that was not designed with iOS in mind is very much an impossibility without a significant re-write. Of course you might be able to extract the state logic written in CLJS, if it is well separated, but assume you’ll be re-writing 95%+ of all view/CSS code.


I don’t personally think Cordova, etc are good approaches, but if you’re OK with all the trade-offs, perhaps take a look at Apparently it’s derived from Cordova and modernized. I haven’t used either of them, so I can’t say much more.


The goal was "turning my mostly web-based (cljs/html) application into an iOS application", so guessing the OP understands significant work lies ahead, but they are hoping for not as significant as a port to Swift. Mind you, I should have asked their current framework: lots of CLJS + RN examples out there for Reagent and re-frame, and soon Matrix. 🙂

👍 4

@U3ES97LAC, what FE framework are you using now?


This guy will have you up on RN in three minutes. 🙂 Hello world, anyway, but we all know what a bear that is.


@U0PUGPSFR Thank you for confirming my suspicions on the pita part. Yeah, I think I need to get a running copy of Xcode first, and I was thinking there was a way to REPL onto an iPhone/iPad, kinda like shadowcljs or figwheel, but I don't necessarily need all that... If I can just package what I have relatively pain-free as an "app" even though it's just a website, maybe it would be plenty good. Needing constant internet connection is probably a non-starter though. So, thinking about it out loud like this, maybe I will work on making all the app data available in one SPA and then port that SPA to iOS.


There is no html in rn so that might be more like rewriting your application than simply moving it across.. if it's a complex app and you don't need specific native components you can make a simple wrapper app using a webview. its definitely the quickest way and has the advantage of staying in sync with the web version, though you have to include some basic native functionality like push notifications so that apple will approve it. We did it for a big web app and just added a native sign in screen which fetched and stored the session token from the server, everything else used the web app in a webview component


If you go down that path I would recommend just using swift though


Otherwise you will have to extract out the common code that can be shared between rn and the web, and then rewrite your views (and anything that users browser only apis like local storage)