Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reagent devcard #16

Closed
dagda1 opened this issue Jul 29, 2014 · 7 comments
Closed

reagent devcard #16

dagda1 opened this issue Jul 29, 2014 · 7 comments

Comments

@dagda1
Copy link

dagda1 commented Jul 29, 2014

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.

@jdmarble
Copy link

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.

@bhauman
Copy link
Owner

bhauman commented Jul 10, 2015

Reagent now works with devcards.

@bhauman bhauman closed this as completed Jul 10, 2015
@whodidthis
Copy link
Contributor

Not sure if possible, but would be interested if someone has an idea on how to use with re-frame

@bhauman
Copy link
Owner

bhauman commented Jul 10, 2015

@whodidthis it should work for the individual reagent components right?

@whodidthis
Copy link
Contributor

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.

@bhauman
Copy link
Owner

bhauman commented Jul 10, 2015

You get the history and data inspection with the second method.

@whodidthis
Copy link
Contributor

Cool, didn't realize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants