import React, { PureComponent } from 'react';
export class ${1:filename} extends PureComponent {
render() {
return (
<div>first</div>
)
}
}
export default ${1:filename}
reactClassExportPureComponent
In this code, React is importing PureComponent from React. PureComponent is a react component library that helps you to create pure, unmounted, stateless components. The exports in this code exports a class named ${1:filename} which extends PureComponent. The constructor for this class takes one parameter, which is the filename of the component. This class renders a div with the text first.
Shortcut: rpce
0 Comments
Add Comment
Log in to add a comment