Closed dagda1 closed 9 years ago
See #12 for an idea on how to get started. I've put the card from that pull request directly in my source. Not very clean, but it gets the job done.
Reagent now works with devcards.
Not sure if possible, but would be interested if someone has an idea on how to use with re-frame
@whodidthis it should work for the individual reagent components right?
They work great, re-frame just has this predefined app-db atom that might make devcards impossible.
Out of interest, is there anything interesting to the atom you can feed to defcard
when it comes to reagent? Is there any difference between
(defonce my-atom (reagent.core/atom {}))
(defcard my-card
(dc/reagent [my-component my-atom]))
and
(defcard my-card
(dc/reagent my-component)
my-atom)
Or is it just as a backup if people want to use om-cards and reagent-cards in a similar way.
You get the history and data inspection with the second method.
Cool, didn't realize
Does devcards work with reagent and if not, could somebody give me a rough idea as to what would be involved in creating a base card that works with reagent.