[Feature Request]: Allow hooks to be passed in component
or similar property - React/Typescript
#23216
Labels
component
or similar property - React/Typescript
#23216
Is your feature request related to a problem? Please describe
Our organization has several hooks documented with storybook, using a component in the story to render them, but on two of them we need to bring in the associated jsdoc commentary which can only be achieved at the moment by passing the hook as the
component
like so:With the goal of a result like:
however, written in this results in a typescript error, as hooks themselves are not rendered components.
Describe the solution you'd like
In a React/Typescript environment, we would like to be able to pass hooks either as the
component
or with their own key.Describe alternatives you've considered
The main workaround we've found is the following, but it requires an
as
type assertion:Are you able to assist to bring the feature to reality?
no
Additional context
No response
The text was updated successfully, but these errors were encountered: