json React / Redux片段
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json React / Redux片段相关的知识,希望对你有一定的参考价值。
{
"reactClassComponent": {
"prefix": "rcc",
"body": [
"import React, { Component } from 'react';",
"import { string } from 'prop-types';",
"",
"export default class ${1} extends Component {",
" static propTypes = {",
" className: string",
" };",
"",
" render() {",
" const { className } = this.props;",
"",
" return (",
" <div className={className} />",
" );",
" }",
"}"
],
"description": "create react component"
},
"reactClassPureComponent": {
"prefix": "rcpc",
"body": [
"import React, { PureComponent } from 'react';",
"import { string } from 'prop-types';",
"",
"export default class ${1} extends PureComponent {",
" static propTypes = {",
" className: string",
" };",
"",
" render() {",
" const { className } = this.props;",
"",
" return (",
" <div className={className} />",
" );",
" }",
"}"
],
"description": "create react pure component"
}
}
以上是关于json React / Redux片段的主要内容,如果未能解决你的问题,请参考以下文章