This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-25
Channels
Would you guys recommend jumping straight to using MX with CLJD for state management rather than whatever other options there are? I come from developing with Flutter/Dart for 4 years, but am new to clojure. Trying to figure out how to get up to speed with building everything I'm used to in Dart, but with clojure. Things such as: a) state management b) data models 3) event streams 4) provider 5) async/await/futures (been reading slack on this one). Trying to achieve the same level of UI detail in cljd as I had gotten with just dart. Also, are you guys using other libraries like javascript in your dependencies very often?
Disclosure: I am the MX author. 🙂 What do you use for state management in the Dart world?
ps. I do not use JS libs myself. Is that possible in Dart? Perhaps only for the Web version?
Yeah, only the web version
Oh, I see you mentioned Provider. MX provides a comprehensive state solution with a lot of transparency. You might check out the https://github.com/kennytilton/flutter-mx/tree/main/examples/example/demo/todoMVC to see what that looks like.
I would just love the control of setState((){}) on stateful widgets. I also end up using ValueNotifiers quite a bit
I liked what you wrote about the app is the database
f/mx handles setState for us. gasp. I recently explored how that is working out and made some tweaks, so I think it is doing a good job at identifying the minimum given any change.
"I liked what you wrote about the app is the database..." Thx! An external store was not a bad try, but boilerplate and cognitive disconnect were suboptimal.
I read through the counter app example and there didn't seem to be an explicit statement that said setstate, it just appeared to happen automatically...I'm trying to find the example. There was something like fC* (something similar) that pointed to some other code
Right. setState
is handled automagically.
K, I'll give it a go
Watched the YT vids you posted with the tts, and was reading through the code to find out where/how the state was getting set and just didn't trust it at first...just a new thing, I suppose, and will try it out
Presently got the Method and Event channels to work and trigger native swift code...wanted to ensure I had that kind of interop
f/mx sees everything changing. If a formula controls a Flutter property of a widget, it climbs up to the first widget that has a setState and fires that. The only non-Flutter property that triggers setState is the kids
, because that maps to child or children in Flutterspeak.
I love having Dart veterans on board! Right now I am grappling with Isolate pause/resume. I guess that is another disclaimer: Flutter is new to me. Learning fast of necessity :rolling_on_the_floor_laughing:
I will be happy to jump on a call with you for an hour or two to get you rolling.
That'd be awesome
Free in about an hour?
And generally support you until you get the hang of MX. It is different, but several over the years have self-taught, so I think once over the initial hump you will be god to go. One hour will be perfect.
The isolates were weird to do in Dart to begin with, and they still have yet to get the web version working...there are js workarounds people have adopted atm
Yes, I gather they fall back to web workers for compute
.
I gotta get driving...will chat soon!
OK, DM when ready.
btw, I extended MX to handle futures/async transparently. I saw the heavy async nature of Flutter and panicked. 🙂
Thanks again for being available. Here's the clojure file. It is a simple layout. A cool thing to see, would be the left side bar, appearing|turning off when the page width is < 600. That way there is a little state management in there. Right now, this is just a layout with some onPressed functions that are printing.
Thanks again for being available. Here's the clojure file. It is a simple layout. A cool thing to see, would be the left side bar, appearing|turning off when the page width is < 600. That way there is a little state management in there. Right now, this is just a layout with some onPressed functions that are printing.