moroshko / react-scanner

Extract React components and props usage from code.
MIT License
563 stars 40 forks source link

Unknown node type: JSXSpreadChild. #62

Closed Janey2022 closed 1 year ago

Janey2022 commented 1 year ago

When I use this tool to analysis the components in the code, it meets the issue for the Unknown node type: JSXSpreadChild.

I look at the scan.js code, it seems when we try to getPropValue(node), it only handle the null, type:"Literal","JSXExpressionContainer" and throw error for others.

My question is, do we support it? If not, can we just skip it instead of ending the entire process?

The following is the error: image

moroshko commented 1 year ago

Could you provide your components code and the react-scanner config you use?

Janey2022 commented 1 year ago

Thanks for following up. Sorry, I may not be able to provide you with the code content, as I am not sure which files of the code hit this part. I just skip the cases when the node type is JSXSpreadChild, and it seems help the scanner to continue.