|
1 | 1 | <templateSet group="ReactJS">
|
2 | 2 | <template
|
3 |
| - name="rcc" |
4 |
| - value="import React, { PropTypes, } from 'react'; const $class$ = React.createClass({ render() { return ( <div>$END$</div> ); } }); export default $class$; " |
5 |
| - description="React: Create a React.js component" |
| 3 | + name="rcls" |
| 4 | + value="import React, { Component, PropTypes, } from 'react'; class $COMPONENT$ extends Component { render() { return ( <div>$END$</div> ); } } $COMPONENT$.propTypes = {}; $COMPONENT$.defaultProps = {}; export default $COMPONENT$; " |
| 5 | + description="React: Create a React ES2015 class" |
6 | 6 | toReformat="true"
|
7 | 7 | toShortenFQNames="true">
|
8 |
| - <variable name="class" expression="complete()" defaultValue="" alwaysStopAt="true" /> |
| 8 | + <variable name="COMPONENT" expression="fileNameWithoutExtension()" defaultValue="" alwaysStopAt="true" /> |
9 | 9 | <context>
|
10 | 10 | <option name="JAVA_SCRIPT" value="true" />
|
11 | 11 | <option name="JS_EXPRESSION" value="true" />
|
|
14 | 14 | </context>
|
15 | 15 | </template>
|
16 | 16 | <template
|
17 |
| - name="rcc5" |
18 |
| - value="'use strict'; var React = require('react'); var PropTypes = React.PropTypes; var $class$ = React.createClass({ render: function() { return ( <div>$END$</div> ); } }); module.exports = $class$; " |
| 17 | + name="rpfc" |
| 18 | + value="import React, { PropTypes, } from 'react'; const $COMPONENT$ = ($PARAMETER$) => { return ( <div>$END$</div> ); }; $COMPONENT$.propTypes = {}; $COMPONENT$.defaultProps = {}; export default $COMPONENT$; " |
| 19 | + description="React: Create a pure function component" |
| 20 | + toReformat="true" |
| 21 | + toShortenFQNames="true"> |
| 22 | + <variable name="COMPONENT" expression="fileNameWithoutExtension()" defaultValue="" alwaysStopAt="true" /> |
| 23 | + <variable name="PARAMETER" expression="" defaultValue=""props"" alwaysStopAt="true" /> |
| 24 | + <context> |
| 25 | + <option name="JAVA_SCRIPT" value="true" /> |
| 26 | + <option name="JS_EXPRESSION" value="true" /> |
| 27 | + <option name="JSX_HTML" value="true" /> |
| 28 | + <option name="JS_STATEMENT" value="true" /> |
| 29 | + </context> |
| 30 | + </template> |
| 31 | + <template |
| 32 | + name="rpfc5" |
| 33 | + value="'use strict'; var React = require('react'); var PropTypes = React.PropTypes; function $COMPONENT$($PARAMETER$) { return ( <div>$END$</div> ); } $COMPONENT$.propTypes = {}; $COMPONENT$.defaultProps = {}; module.exports = $COMPONENT$; " |
| 34 | + description="React: Create a pure function component" |
| 35 | + toReformat="true" |
| 36 | + toShortenFQNames="true"> |
| 37 | + <variable name="COMPONENT" expression="fileNameWithoutExtension()" defaultValue="" alwaysStopAt="true" /> |
| 38 | + <variable name="PARAMETER" expression="" defaultValue=""props"" alwaysStopAt="true" /> |
| 39 | + <context> |
| 40 | + <option name="JAVA_SCRIPT" value="true" /> |
| 41 | + <option name="JS_EXPRESSION" value="true" /> |
| 42 | + <option name="JSX_HTML" value="true" /> |
| 43 | + <option name="JS_STATEMENT" value="true" /> |
| 44 | + </context> |
| 45 | + </template> |
| 46 | + <template |
| 47 | + name="rcc" |
| 48 | + value="import React, { PropTypes, } from 'react'; const $COMPONENT$ = React.createClass({ render() { return ( <div>$END$</div> ); } }); export default $COMPONENT$; " |
19 | 49 | description="React: Create a React.js component"
|
20 | 50 | toReformat="true"
|
21 | 51 | toShortenFQNames="true">
|
22 |
| - <variable name="class" expression="complete()" defaultValue="" alwaysStopAt="true" /> |
| 52 | + <variable name="COMPONENT" expression="fileNameWithoutExtension()" defaultValue="" alwaysStopAt="true" /> |
23 | 53 | <context>
|
24 | 54 | <option name="JAVA_SCRIPT" value="true" />
|
25 | 55 | <option name="JS_EXPRESSION" value="true" />
|
|
28 | 58 | </context>
|
29 | 59 | </template>
|
30 | 60 | <template
|
31 |
| - name="rcls" |
32 |
| - value="import React, { Component, PropTypes, } from 'react'; class $class$ extends Component { render() { return ( <div>$END$</div> ); } } $class$.propTypes = {}; $class$.defaultProps = {}; export default $class$; " |
33 |
| - description="React: Create a ES2015 class" |
| 61 | + name="rcc5" |
| 62 | + value="'use strict'; var React = require('react'); var PropTypes = React.PropTypes; var $COMPONENT$ = React.createClass({ render: function() { return ( <div>$END$</div> ); } }); module.exports = $COMPONENT$; " |
| 63 | + description="React: Create a React.js component" |
34 | 64 | toReformat="true"
|
35 | 65 | toShortenFQNames="true">
|
36 |
| - <variable name="class" expression="complete()" defaultValue="" alwaysStopAt="true" /> |
| 66 | + <variable name="COMPONENT" expression="fileNameWithoutExtension()" defaultValue="" alwaysStopAt="true" /> |
37 | 67 | <context>
|
38 | 68 | <option name="JAVA_SCRIPT" value="true" />
|
39 | 69 | <option name="JS_EXPRESSION" value="true" />
|
|
0 commit comments