Is there a way to use storybook to document helper functions/React Hooks in your react library? #15512
Unanswered
chadlavi-casebook
asked this question in
Help
Replies: 1 comment 2 replies
-
I'm putting hooks in |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example, I have several helper functions and React Hooks that are used throughout my TypeScript React lib. They don't return jsx, they return strings, booleans, sometimes objects. You know, helper function stuff. Point being, they're not components, so I can't document them the way I would document a react component.
How can I incorporate these into my storybook documentation without just manually writing documentation for them that would need to be updated manually if they are ever edited? I have JSDoc comments on these functions, so I know that in theory react docgen could pick them up. Just don't know how to get that to work in Storybook.
Beta Was this translation helpful? Give feedback.
All reactions