This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (5)
- # aws (5)
- # babashka (7)
- # beginners (152)
- # cider (10)
- # clj-kondo (30)
- # clj-on-windows (1)
- # cljs-dev (14)
- # cljsrn (19)
- # clojure (94)
- # clojure-australia (4)
- # clojure-europe (43)
- # clojure-nl (2)
- # clojure-uk (11)
- # clojurescript (16)
- # clojureverse-ops (5)
- # code-reviews (7)
- # community-development (6)
- # core-async (29)
- # cursive (50)
- # datomic (22)
- # docker (10)
- # figwheel-main (3)
- # fulcro (4)
- # graalvm (1)
- # introduce-yourself (2)
- # kaocha (9)
- # lambdaisland (2)
- # lsp (19)
- # malli (37)
- # off-topic (50)
- # polylith (8)
- # portal (1)
- # reagent (10)
- # rum (1)
- # shadow-cljs (24)
- # spacemacs (14)
- # yada (2)
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.
This the best of many Matrix write-ups, code pens, fiddles... : https://github.com/kennytilton/mxtodomvc/blob/master/README.md
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 + https://github.com/orestis/reseda for smaller projects and was thinking of using something like https://homebase.io 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 https://github.com/PEZ/rn-rf-shadow 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 https://capacitorjs.com 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. 🙂
@U3ES97LAC, what FE framework are you using now?
This guy will have you up on RN in three minutes. 🙂 https://github.com/PEZ/rn-rf-shadow#using-clojurescript-repl Hello world, anyway, but we all know what a bear that is.
re-frame of course. This is Reagent on Krell: https://github.com/vouch-opensource/krell/wiki/Reagent-Tutorial
@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