Fork me on GitHub
#devcards
<
2016-04-07
>
kasuko03:04:07

Is there a way to get devcards to work with re-frame? I really like re-frame's flows but the global state seems like it won't fly with devcards. Is there a way to stub the global state with the local state in the card?

darwin11:04:59

@kasuko: it is not possible easily, you might want to check you my pure-frame: https://github.com/binaryage/pure-frame or search for “iframe” solution to this problem, where some people were able to embed re-frame apps as iframes into devcards

kasuko15:04:50

I was looking at pure-frame and I really like it and I am starting from scratch so it wouldn't be hard to use it. I'm just interested in how much it parallels current re-frame development. I understand it's a fork but does it stay current?

nberger16:04:34

@kasuko I'm the one who is working on the idea of adding iframe support to devcards, so each devcard can be mounted inside of an iframe. Even though we are effectively using it in our project, and are pretty happy with it, we would be even happier if we were using pure-frame and not needed this added complexity.

nberger16:04:35

If you want to play with it, it's in https://github.com/nberger/devcards/tree/iframe. The current snapshot release in clojars that I'm using is [org.clojars.nberger/devcards "0.2.0-8-iframe.2-SNAPSHOT"]. I still didn't open a PR because I have some work to do in improving the API, after some discussion from @bhauman, but I'll open one soon so anyone can take part on the discussion

kasuko18:04:33

@nberger Thanks, this is mostly for a learning project so I think I might attempt to do something strange and maybe try to get an FRP library to work with Quiescent or Rum and do the flow myself. If I start hitting a wall maybe some things will have settled down.

nberger19:04:20

@kasuko sounds like a smart strategy, go for it!

darwin19:04:43

IMO the value of re-frame is the “readme”, I mean the excellent work @mikethompson et al. invested into definition and documentation of the pattern. The actual code is just a bonus. I would recommend people to implement their own versions of re-frame pattern tailored to their app’s needs (with inspiration from the official implementation). That way they will gain full understanding of inner workings and can tailor it to their needs. I understand that people are “too busy with their lives" to reinvent the wheel. But in this case it is not as much code and it is such fundamental piece of app logic that it should be written at least once by everyone who wants to work with it.