Fork me on GitHub
#helix
<
2022-11-02
>
kennytilton12:11:36

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.

kennytilton12:11:32

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

kennytilton15:11:33

All better. 😅

kennytilton15:11:52

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.

colliderwriter18:11:10

thanks for the reply, will read with interest

kennytilton20:11:21

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.

kennytilton21:11:57

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.

dvingo14:11:18

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

lilactown14:11:57

impressive!!

dvingo14:11:43

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.

J14:11:58

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

dvingo15:11:09

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
J15:11:08

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

dvingo15:11:49

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

J15:11:30

> 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?

dvingo16:11:56

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