Closed
Description
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:
Related: #393
Metadata
Metadata
Assignees
Labels
No labels