Fork me on GitHub
#reagent
<
2019-09-09
>
alex13:09:36

What are some good approaches to documenting Reagent components? Things along the lines of docstrings, the equivalent of React proptypes, etc. Examples would be appreciated

dominicm13:09:57

What's wrong with docstrings?

dominicm13:09:14

*clojure doc strings

aisamu14:09:47

Proptypes sort of fall into the same land as specs (`fdef`)

alex00:09:22

I think docstrings are great! I was just hoping to find some good examples of well documented reagent components with docstrings

witek14:09:54

Hi. I am using https://github.com/cljsjs/packages/tree/master/material-ui I would like to use the simple Menu with a Button. Here is the example in the documentation: https://material-ui.com/components/menus/ My problem: I have to create a something like this: [:div [:> mui/Button "Menu"] [:> mui/Menu {:open true :anchor-el ???}]] Here I need to pass the menu button to the :anchor property. How to do this? Thank you!

aisamu14:09:42

You might need to fetch the :ref and pass that down

witek14:09:25

I have no idea how to fetch the :ref 😞

witek15:09:47

That's it. Thank you! 😄

🎉 4