Unable to display nested components props correctly
See original GitHub issueI might be mis-using the functionnality, in case apologies; but I havent’t found any relevant clues if this use case had to be handled differently
Feature request related to a problem?* Re-using nested components props to validate on parent component as follow :
Component.propTypes = {
header: PropTypes.shape(CardHeader.propTypes),
...
};
But getting weird displays :
Using the following syntax :
Component.propTypes = {
header: PropTypes.shape({ ...CardHeader.propTypes })
};
Getting the following display (empty hash) :
Describe the solution you’d like
Getting the same output as a manual shape
use would provide
Alternatives considered None yet
Able to bring the feature to reality? no, unsure
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
unable to set prop on nested component - Stack Overflow
In this case, it most likely means you are trying to access selectedSectionId before this.props.item is initialized. How are the props passed ...
Read more >React: Nested Components and Props - [007] - YouTube
In this episode we show you how to nest a component inside a component. We also show you the power of props. These...
Read more >Troubleshooting | React Navigation
I'm getting an error "Unable to resolve module" after updating to the latest version ... The component prop expects a React Component, but...
Read more >Guide to components in Figma
Users with can view access to the original file can use components from that Library. Video tutorials. Check out these video tutorials about...
Read more >Hooks FAQ - React
Do Hooks replace render props and higher-order components? ... remove classes from React — we all need to keep shipping products and can't...
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 FreeTop 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
Top GitHub Comments
Sorry I haven’t had a chance to dig into this. But if you’re on 6.0 you can manually override the ArgsTable values if the automated stuff is not doing what you need: https://github.com/storybookjs/storybook/blob/next/addons/controls/README.md#my-controls-arent-being-auto-generated-what-should-i-do
Hi everyone! Seems like there hasn’t been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don’t have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!