Devcards aims to provide a visual REPL experience for ClojureScript
kasuko 2016-04-07T03:12:07.000132Z

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?


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

kasuko 2016-04-07T15:26:50.000135Z

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?

nberger 2016-04-07T16:47:34.000136Z

@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.

nberger 2016-04-07T16:50:35.000137Z

If you want to play with it, it's in 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

kasuko 2016-04-07T18:07:33.000139Z

@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.

nberger 2016-04-07T19:02:20.000140Z

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


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.