Skip to content

Unknown node type: JSXSpreadChild #70

Open
@yakunins

Description

To support JSX spread child and to avoid such a error in scan.js:

Error: Unknown node type: JSXSpreadChild
    at getPropValue (C:\ServiceTitan\playground\DesignSystem\react-scanner\node_modules\react-scanner\src\scan.js:48:9)
    at getInstanceInfo (C:\ServiceTitan\playground\DesignSystem\react-scanner\node_modules\react-scanner\src\scan.js:82:11)
    at Object.exit (C:\ServiceTitan\playground\DesignSystem\react-scanner\node_modules\react-scanner\src\scan.js:221:22)

please replace

if (node.type === "JSXExpressionContainer") {

with

  if (node.type === "JSXExpressionContainer" || node.type === "JSXSpreadChild") {

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions