devcards

Devcards aims to provide a visual REPL experience for ClojureScript https://github.com/bhauman/devcards
2019-03-22T14:51:28.000900Z

hi everyone, i've written a library for visual testing of devcards. screenshot, compare and assert your application's presentation! https://github.com/oliyh/kamera

raymcdermott 2019-03-22T16:46:54.002200Z

wondering if there are good resources on using devcards with re-frame … I can’t see anything on the github other than there are problems 😉

raymcdermott 2019-03-22T16:47:59.003100Z

and - keeping it real (i.e. lazy) - I don’t want to use forks of devcards or re-frame

2019-03-22T17:17:17.004100Z

i tend to write my render fns pure, so they don't have any integration with re-frame at all, and the render fns are the things i make devcards for

2019-03-22T17:18:04.004600Z

if i wanted to test behaviour i might be more inclined to write a re-frame unit test or an enzyme test

2019-03-22T17:19:18.005Z

(i wrote a blog post about the approach here: https://juxt.pro/blog/posts/cljs-apps.html)

raymcdermott 2019-03-22T21:35:20.006200Z

Thanks @oliy I’ll check it out

raymcdermott 2019-03-22T21:37:35.008700Z

FYI I came back to devcards after rewatching @bhauman’s StrangeLoop video

raymcdermott 2019-03-22T21:37:49.009200Z

And he emphasises the react integration

raymcdermott 2019-03-22T21:38:01.009600Z

Maybe these days it’s down played?

2019-03-22T21:39:21.010300Z

^ Do you mean re-frame or react? I've not seen that talk

raymcdermott 2019-03-22T21:51:20.010700Z

He said react

raymcdermott 2019-03-22T21:52:02.011600Z

React begets reagent begets re-frame though

raymcdermott 2019-03-22T21:52:44.012700Z

I looked ay your post - very well written

raymcdermott 2019-03-22T21:54:15.015300Z

I’ll need to sleep on whether I can use that approach on my project though since there are some dynamic UI aspects that flow from subscriptions

raymcdermott 2019-03-22T21:55:54.017600Z

I think @bhauman may have used reagent in the talk but need to double check

2019-03-22T21:55:54.017700Z

thanks. it's usually not possible to arrange everything like that, but that's what i aim for. the more complicated bits sometimes do have to remain as they are

raymcdermott 2019-03-22T21:57:14.019200Z

Agreed and when they can, it seems like a great approach that will work on many UIs