oslabs-beta / ReacTree

ReacTree - VS Code extension that generates a hierarchy tree of React components with each node listing the passed down props, indicating whether it's connected the Redux store, and guiding you to the associated file with the click of a button
https://reactree.dev/
MIT License
149 stars 31 forks source link

No tree generated for index.tsx files #44

Open craig-ryan-sn opened 1 year ago

craig-ryan-sn commented 1 year ago

I see related issues from back in March, were they ever resolved? I'm using ReacTree v1.0.8

I have a react TS NextJS project with yarn workspaces, so I have imports like this

import { useQuery } from '@apollo/client'; import { DraftStatus } from '@srnade/common'; import { Button, Icon, Typography } from '@srnade/ui';

My index.tsx contains simple structure like:

const MyStudio: NextPage = (... <Container <Link... <Scroll... <MyOtherComponent

nothing is displayed including any data or child components. Just a single node for index.tsx itself and a link to open the file. Can you explain what is wrong with the above, and why it can't even expand simple children imported via relative imports? Does it need to be able to resolve everything before it can display anything at all?

Hope the above is clear, thanks!

tiimonn commented 1 week ago

same here

kerryj89 commented 1 week ago

I wanted to use this with Storybook. I don't have a root level app.tsx or index that kickstarts the component tree. Is this not a supported setup? I wanted to open the components folder and and for it to be able to analyze and graph all the dependencies between components. Sorry if this is a different issue but I get the same result where I just see my component sitting all alone in the tree after selecting it.