Skip to content

Syntax support for ES property initializers #433

Closed
@iansinnott

Description

@iansinnott

I'm not sure if this is a bug or simply something that is not yet supported, but it would be awesome to see support for ES class property initializers. They are currently a stage-1 proposal but they make authoring React components much nicer.

I've tried this on both develop and master.

Example code:

export class About extends React.Component {
  static propTypes = {
    children: PropTypes.any,
  }
  render() {
    return (
      <div className={cx('page')}>
        <div className={cx('siteTitle')}>
          <h1>About Page</h1>
        </div>
        <p>Welcome to the about page...</p>
      </div>
    );
  }
}

export class NotFound extends React.Component {
  render() {
    return (
      <div className={cx('page')}>
        <h4>Not found</h4>
      </div>
    );
  }
}

Here's how it's currently being highlighted. I annotated the screenshot with the syntax IDs of the highlighted parts of text:

app_js______dev_js_redux-second-run_client_components__-_vim

Related: #393

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions