Fork me on GitHub
#rum
<
2016-05-07
>
kauko09:05:03

Has anyone used devcards with Rum?

niwinz09:05:17

I don't know...

kauko09:05:19

Oh @niwinz one question that I got when reading your post: can you change your app state through figwheel, or is it.. "hidden" inside the stream objects?

niwinz09:05:38

Yes, you can do it

niwinz09:05:23

as I have explained, a function is already implement the pure state transofrmation protocol

niwinz09:05:34

so you can emit a function that does whatever you want with the state

niwinz09:05:15

(emit! #(assoc-in % [:some :path] value))

kauko09:05:47

and you have some atom that holds the whole app state somewhere, right? So you can just deref it?

niwinz09:05:04

yes, but is not mandatory

niwinz09:05:14

the atom is just a materialization of state

niwinz09:05:55

so if you modify that atom with swap! or reset! that changes will be overwitten at some time (strictly speaking on the provided example and how I use that)

kauko09:05:32

Hmm, I see. Hopefully I'll have time to look at your source code at some point

kauko09:05:23

looks like a pretty good approach. Similar ideas as re-frame, and many others..? Though I do like the use of records

kauko09:05:37

I believe re-frame uses keywords for events

niwinz09:05:43

I know about re-frame and some others

niwinz09:05:53

but they have not convinced me

kauko09:05:14

Hmm, yeah. Pretty much the same with me. I'm sure re-frame works great, but I'm a bit skeptical how it would scale when your app gets really big.. I'm in a project that's been going on for 1.5 years with 6 devs, and what I understand from re-frame, I worry that it wouldn't work for us

niwinz09:05:16

and I don't like use "frameworks" or libraries in the core of my application. I prefer use libraries on the corners and leve the application core under complete my domain

kauko09:05:44

I'm not sure I like using Rx though. I've used it before and it's really good, but somehow I'd like to see a solution that didn't introduce such a "heavy" dependency. When you use Rx you're pretty much married to its ideas

kauko09:05:52

and there's quite a lot to learn

niwinz09:05:15

yeah, it is, is a really a tradeoff

niwinz09:05:25

In my case I reall like the rx approach

niwinz09:05:41

so it is ok from my side use rx

niwinz09:05:50

but as I have said on the end of article

niwinz09:05:06

that works for me but I can't assure it will work for every project/team

kauko09:05:36

I wonder if the details of Rx can be hidden?

kauko09:05:07

I guess you have to know Rx when writing WatchEvent records..

niwinz09:05:50

Yes, this is the way to handle async stuff

niwinz09:05:28

I have thought about that

niwinz09:05:54

and using something different than rx makes thinkg much less composable

niwinz09:05:08

for do something like that you should choice your abstraction and have a little bit coupling with that solution