Reputation: 75986
Is there some VsCode extension, tool or tip to get some graph or report of the internal dependencies of React components, inside a React project?
Specifically, suppose I have defined my component <MyComponent .../>
; I wish to know which other components (always inside my project) include it as children, like <ParentComponent> ... <MyComponent .../> <ParentCOmponent>
and, viceversa.
Upvotes: 0
Views: 775
Reputation: 7781
One useful tool for outline the component tree -or- Debugging is the React Developer Tools
chrome extension (Components tab).
Download here: https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en
Related: https://reactjs.org/blog/2019/08/15/new-react-devtools.html
React.Children
https://reactjs.org/docs/react-api.html#reactchildren
Upvotes: 1