burkeholland / simple-react-snippets

Simple React Snippets for VS Code that you will actually use
212 stars 83 forks source link

cc has no state and no () for render #65

Closed AminGholizad closed 2 years ago

AminGholizad commented 3 years ago

In change log it says

1.0.6 Add state prop to Component Class (cc) Wrap return from render in () by default for Component Class (cc) and Component Class Constructor (ccc) Use pipes in README to better articulate tab stops

and I use v1.2.4 and when I type cc it generates this:

class  extends React.Component {
    render() { 
        return <div></div>;
    }
}

export default ;

its better to do like this:

class  extends Component {
    state = 
    render() { 
        return (<div></div>);
    }
}

export default ;