What is the purpose of the component property in CSF?
See original GitHub issueThis is just a question, not a bug report; I’ve scoured the docs looking for an answer but haven’t found any. The docs state that a CSF module should default-export a metadata object like
export default {
title: 'Path|To/MyComponent',
component: MyComponent,
decorators: [ ... ],
parameters: { ... }
}
What is the purpose of the component
property? I’ve seen elsewhere that it is omitted, and I can’t tell what value it adds.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Cerebrospinal fluid (CSF): Definition, Function, and Composition
The purpose of CSF is to provide nutrients, remove waste, and cushion the brain and spine. The normal composition of CSF is a...
Read more >Physiology, Cerebral Spinal Fluid - StatPearls - NCBI Bookshelf
CSF provides hydromechanical protection of the neuroaxis through two mechanisms. First, CSF acts as a shock absorber, cushioning the brain ...
Read more >CSF Cerebrospinal Fluid - Physiopedia
Cerebrospinal fluid (CSF) plays an essential role in maintaining the homeostasis of the central nervous system. The functions of CSF include: (1) buoyancy...
Read more >Cerebrospinal fluid - Wikipedia
Cerebrospinal fluid (CSF) is a clear, colorless body fluid found within the tissue that surrounds the brain and spinal cord of all vertebrates....
Read more >Properties and contents of cerebrospinal fluid
The active transport component of CSF production relies on the active transport of sodium and chloride, with water movement through ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Right now, it’s only used in
addon-docs
.DocsPage
uses it to automatically extract the props table & description of the component. However, it will get a lot more use in the future.For example, stories for many non-react frameworks currently look like this:
Other uses include addons that want to associate component-related statistics on top of the stories. For example, I recently prototyped a code coverage addon that relies on
component
.Updated the docs per your suggestion @ekilah
Also see https://github.com/storybookjs/csf/pull/5 which will be incorporated into a broader Storybook TS upgrade soon