helix

kennytilton 2022-11-02T12:00:36.911979Z

From the Matrix side, @colliderwriter, I will go check if this has succumbed to bit rot: https://github.com/kennytilton/matrix/tree/main/cljc/rxtrak That unifies HTML/CSS, localStorage, an async timer, Bide routing, and XHR handling in a unified reactive dataflow. brb.

kennytilton 2022-11-02T12:23:32.764939Z

Haha, I broke Matrix two days ago improving the diagnostics! No good deed...brb.

kennytilton 2022-11-02T15:31:33.582959Z

All better. πŸ˜…

kennytilton 2022-11-02T15:49:52.318159Z

I did find mxweb referencing an old mxxhr and fixed that. Still no luck. Then I gave up and bumped all the version numbers. But now I am wondering what happens if I deploy B which uses A, and then change A, and my app uses A and B. Anyway, not a figwheel issue. Sorry for the noise.

2022-11-02T18:18:10.608839Z

thanks for the reply, will read with interest

kennytilton 2022-11-02T20:54:21.278339Z

Oh, sorry, I meant my last post here to close out a question I had raised in the figwheel channel. Anyway, the aforementioned rxTrak project should build/run OK. btw, It got cosmetically awful when I got fancy with the auto-clock and "overdue" indicator, but I wanted to sneak that in as an example of how an app can be elaborated over time with new features, without much fuss. Enjoy.

kennytilton 2022-11-02T21:00:57.897899Z

ps. rxTrak is fine for those content to read code, but this write-up of a small app using the JS version of Matrix is chattier: https://tilton.medium.com/simplejx-aweb-un-framework-e9b59c12dcff DM me or continue on the #matrix channel if you have questions.

dvingo 2022-11-02T14:09:18.652289Z

I just published this sample repo using helix with react-hook-form, fulcro for global app state, transactions, and networking, and subscriptions to get reactive UI https://github.com/matterandvoid-space/todomvc-fulcro-subscriptions

lilactown 2022-11-02T14:13:57.907899Z

impressive!!

dvingo 2022-11-02T14:26:43.254019Z

thanks! been iterating on this sort of stack for a while now, feeling like I am finally settling on something useful/good. Really appreciate you creating and sharing helix! Love the design of just letting you use React and getting out of the way.

J 2022-11-02T14:51:58.828709Z

Look awesome @danvingo, thanks for this repo. Have you check refx (https://github.com/ferdinand-beyer/refx)

dvingo 2022-11-02T15:04:09.799429Z

yep I saw it! great to see other innovation in the space. I don't agree with putting app-db as a static defonce (precludes use in clojure as just one downside), but have been thinking about adopting refx for the event side of the app (`dispatch`) and then implementing a :fulcro effect for mutations. I think the purity of events/effects is quite nice for testing and fulcro doesn't have a good solution for side-effects from a functional programming point of view, but it's pretty low priority right now.

πŸ‘ 1
J 2022-11-02T15:10:08.291239Z

I have tested refx with datascript here (https://gist.github.com/jeans11/38fe1a66553546de531f0746dc8aae5c). Works fine.

dvingo 2022-11-02T15:44:49.077939Z

right, you can achieve the same with re-frame - just put the datascript db under a top level key. You don't really need refx to work with helix. My subscriptions lib still uses reagents' reactive atom namespace, but none of the UI code. It adds ~9kb to the release build

J 2022-11-02T15:49:30.789989Z

> You don’t really need refx to work with helix. Yes but I like re-frame subscription, events, etc... and how manage global app state without re-frame, etc...? with react context?

dvingo 2022-11-02T16:01:56.629739Z

sorry, i meant you can use re-frame with helix just fine, the missing piece is subscriptions however - so you would need a react hook to get re-rendering working. for that you can copy the hook in refx or in my subscription lib

πŸ‘ 1