Skip to content

JSX Identify the problem #2107

Open
Open

Description

@enjoy-wind

React class component arrow function cannot be recognized.

Example Content:

import React from 'react'

class test extends React.Component{
constructor(props) {
super(props);
this.state = {
}
}

initData = (item) =>{
}

render() {
return (


)
}
}

export default connect(mapStateToProps)(LinkageSwitchItem)

Steps to reproduce

esprima.parse('some code')

Expected output

Actual output

Relevant references

Activity

  1. jogibear9988 commented on Jan 1, 2022

    @jogibear9988

    maybe try my fork, esprima-next

  2. enjoy-wind commented on Jan 1, 2022

    @enjoy-wind
    Author

    I have fixed this issue myself, what attempts to support VUE.

  3. jogibear9988 commented on Jan 1, 2022

    @jogibear9988

    I've seen your commit, but it could happen again, and I don't see much development here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions