Devcards aims to provide a visual REPL experience for ClojureScript
kauko 2016-05-24T07:48:22.000098Z

Uhm, I'm trying to use with-redefs with devcards + Rum/Reagent, and I'm starting to feel like this will not work. With Rum it doesn't really work at all since components are defined using the defc macro, and with Reagent it only does something when I create the component with (component), not [component]. This is not related to devcards at all, but I was just wondering if someone here has ran into this and managed to go around somehow

kauko 2016-05-24T07:49:17.000099Z

What I'd like to do is mock some parts of the app, for example if I have a save button I'd like to create a card where the action always fails, and one where it always succeeds. Or rather, looks like it always fails/succeeds. šŸ™‚

kauko 2016-05-24T07:50:10.000100Z

The problem with (component) is that if you create the reagent component like that, it won't re-render when atoms change

kauko 2016-05-24T07:53:26.000101Z

@shaun-mahood: I'm interested in hearing how you use devcards in your everyday workflow? I'm going to talk to js devs about cljs tomorrow and the day after that, and I'm planning on showing them figwheel and devards, among other thing (focusing on workflow). I've never used devcards in a "real project", so it would be nice to hear about your experiences

shaun-mahood 2016-05-24T14:57:28.000103Z

@kauko: Sure, just writing up a gist and will put the link in here.

shaun-mahood 2016-05-24T15:09:25.000104Z

Here's the basics of how I use it for actual projects. Once I've done that, it lives on as documentation and tests (and as a replacement for code comments).

grav 2016-05-24T17:49:59.000105Z

Iā€™m using reagent 0.6.0-alpha2, which depends on [cljsjs/react-dom "15.0.2-0ā€]

grav 2016-05-24T17:50:48.000106Z

However, when running lein deps :tree, Iā€™m asked to do [reagent "0.6.0-alpha2" :exclusions [cljsjs/react]], since devcards depends on [cljsjs/react-dom "0.14.3-0ā€].

grav 2016-05-24T17:52:02.000110Z

If I do such an exclusion, everything seems to work, but am I then in practice using React Dom0.14?

kauko 2016-05-24T18:51:42.000112Z

@shaun-mahood: thanks, appreciate it! I've been giving devcards a try but I've never used it in a "real project", so it's nice to see that it can indeed be more than just a toy

kauko 2016-05-24T18:52:14.000113Z

the with-redefs thing I asked about earlier is a real bummer though, but I guess there's nothing we can do about it

shaun-mahood 2016-05-24T18:56:32.000114Z

@kauko: I've so far always found ways to refactor my code so that I can use it nicely with devcards - maybe take a look at seeing if you can get the same behaviour without using with-redefs. For reagent specific, take a look at the reagent specific info on if you haven't, I think there should be a way around that in one of the linked pages near the bottom (under "Reagent Tutorials")