Situation
So we have three different sources of documentation:
- The recharts.org website
- The storybook args
- The Typescript type definition
And bonus! Five sources for what is the default value:
- The same three as above
- The component itself
- Defaults in the reducer/slice in state
The problem
There is nothing that forces these five places to be synchronized and so depends where you look you will find conflicting information.
What have I tried
I tried to play around with https://storybook.js.org/docs/configure/integration/typescript but it doesn't seem to be working quite 100% - for example it doesn't set the defaults in the Controls tab (currently we use getStoryArgsFromArgsTypesObject for this which works fine but requires us to manually maintain the argTypes).
This docgen solution anyway will allow us to generate (2) storybook args from (3) the type but it will not solve the website and will not solve the component default props being out of sync with the type and will not solve the reducer defaults out of sync with the type.
Alternatives?
We could have a script that checks that these all places are in sync?
Any other ideas?
Situation
So we have three different sources of documentation:
And bonus! Five sources for what is the default value:
The problem
There is nothing that forces these five places to be synchronized and so depends where you look you will find conflicting information.
What have I tried
I tried to play around with https://storybook.js.org/docs/configure/integration/typescript but it doesn't seem to be working quite 100% - for example it doesn't set the defaults in the Controls tab (currently we use
getStoryArgsFromArgsTypesObjectfor this which works fine but requires us to manually maintain the argTypes).This docgen solution anyway will allow us to generate (2) storybook args from (3) the type but it will not solve the website and will not solve the component default props being out of sync with the type and will not solve the reducer defaults out of sync with the type.
Alternatives?
We could have a script that checks that these all places are in sync?
Any other ideas?