├── jetbrains
├── IntelliJ IDEA Global Settings
└── templates
│ └── ReactJS.xml
├── settings.jar
├── src
├── doc.hbs
├── ReactJS.hbs
├── events.yaml
└── template.yaml
├── .gitignore
├── package.json
├── LICENSE
└── README.md
/jetbrains/IntelliJ IDEA Global Settings:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/settings.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/minwe/jetbrains-react/HEAD/settings.jar
--------------------------------------------------------------------------------
/src/doc.hbs:
--------------------------------------------------------------------------------
1 | {{#each this}}
2 | ### `{{{name}}}`
3 |
4 | ```js
5 | {{{tplRaw}}}
6 | ```
7 |
8 | {{/each}}
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 |
5 | # Runtime data
6 | pids
7 | *.pid
8 | *.seed
9 |
10 | # Directory for instrumented libs generated by jscoverage/JSCover
11 | lib-cov
12 |
13 | # Coverage directory used by tools like istanbul
14 | coverage
15 |
16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17 | .grunt
18 |
19 | # node-waf configuration
20 | .lock-wscript
21 |
22 | # Compiled binary addons (http://nodejs.org/api/addons.html)
23 | build/Release
24 |
25 | # Dependency directory
26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27 | node_modules
28 |
29 | .idea
30 |
--------------------------------------------------------------------------------
/src/ReactJS.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{#each this}}
3 | {{#if variables}}{{#each variables}}
9 | {{/each}}{{/if}}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{/each}}
18 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jetbrains-react",
3 | "version": "4.0.1",
4 | "description": "React snippets(live templates) for JetBrains series editors.",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "jar": "jar cfvM settings.jar -C jetbrains templates jetbrains/IntelliJ\\ IDEA\\ Global\\ Settings",
9 | "build": "node build.js && npm run jar"
10 | },
11 | "repository": {
12 | "type": "git",
13 | "url": "git+https://github.com/Minwe/jetbrains-react.git"
14 | },
15 | "keywords": [
16 | "JetBrains",
17 | "React",
18 | "live-templates",
19 | "snippets"
20 | ],
21 | "author": "minwe ",
22 | "license": "MIT",
23 | "bugs": {
24 | "url": "https://github.com/Minwe/jetbrains-react/issues"
25 | },
26 | "homepage": "https://github.com/Minwe/jetbrains-react#readme",
27 | "devDependencies": {
28 | "handlebars": "^4.0.6",
29 | "js-yaml": "^3.8.3"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Minwe LUO
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/src/events.yaml:
--------------------------------------------------------------------------------
1 | # Clipboard Events
2 | onCopy: oncp
3 | onCut: onct
4 | onPaste: onpt
5 |
6 | # Composition Events
7 | onCompositionEnd: oncpse
8 | onCompositionStart: oncpss
9 | onCompositionUpdate: oncpsu
10 |
11 | # Keyboard Events
12 | onKeyDown: onkd
13 | onKeyPress: onps
14 | onKeyUp: onku
15 |
16 | # Focus Events
17 | onFocus: onfs
18 | onBlur: onbl
19 |
20 | # Form Events
21 | onChange: oncg
22 | onInput: onip
23 | onSubmit: onsb
24 |
25 | # Mouse Events
26 | onClick: onc
27 | onContextMenu: oncm
28 | onDoubleClick: ondc
29 | onDrag: ondg
30 | onDragEnd: ondge
31 | onDragEnter: ondgetr
32 | onDragExit: ondget
33 | onDragLeave: ondgl
34 | onDragOver: ondgo
35 | onDragStart: ondgst
36 | onDrop: ondp
37 | onMouseDown: onmd
38 | onMouseEnter: onme
39 | onMouseLeave: onml
40 | onMouseMove: onmm
41 | onMouseOut: onmot
42 | onMouseOver: onmov
43 | onMouseUp: onmu
44 |
45 | # Selection Events
46 | onSelect: onsl
47 |
48 | # Touch Events
49 | onTouchCancel: ontc
50 | onTouchEnd: onte
51 | onTouchMove: ontm
52 | onTouchStart: onts
53 |
54 | # UI Events
55 | onScroll: onsl
56 |
57 | # Wheel Events
58 | onWheel: onwl
59 |
60 | # Media Events
61 | onAbort: onabt
62 | onCanPlay: oncpl
63 | onCanPlayThrough: oncpt
64 | onDurationChange: ondc
65 | onEmptied: onempt
66 | onEncrypted: onekpt
67 | onEnded: onend
68 | # onError: onerr
69 | onLoadedData: onldd
70 | onLoadedMetadata: onldmd
71 | onLoadStart: onls
72 | onPause: onpaus
73 | onPlay: opl
74 | onPlaying: onplg
75 | onProgress: onpgs
76 | onRateChange: onrc
77 | onSeeked: onsked
78 | onSeeking: onskin
79 | onStalled: onstd
80 | onSuspend: onsupd
81 | onTimeUpdate: ontu
82 | onVolumeChange: onvc
83 | onWaiting: onwt
84 |
85 | # Image Events
86 | onLoad: onld
87 | onError: onerr
88 |
89 | # Animation Events
90 | onAnimationStart: onas
91 | onAnimationEnd: onae
92 | onAnimationIteration: onai
93 |
94 | # Transition Events
95 | onTransitionEnd: ontse
--------------------------------------------------------------------------------
/src/template.yaml:
--------------------------------------------------------------------------------
1 | # Create component
2 |
3 | # https://babeljs.io/blog/2015/06/07/react-on-es6-plus
4 | rcls:
5 | description: Create a React ES2015 class
6 | tpl: |
7 | import React, { Component } from 'react';
8 | import PropTypes from 'prop-types';
9 |
10 | class $COMPONENT$ extends Component {
11 | static defaultProps = {
12 | $START$
13 | };
14 |
15 | static propTypes = {
16 | };
17 |
18 | state = {
19 | };
20 |
21 | render() {
22 | return (
23 | $END$
24 | );
25 | }
26 | }
27 |
28 | export default $COMPONENT$;
29 |
30 | variables:
31 | - {name: 'COMPONENT', expression: 'fileNameWithoutExtension()'}
32 |
33 | rpc:
34 | description: Create a PureComponent
35 | tpl: |
36 | import React, { PureComponent } from 'react';
37 | import PropTypes from 'prop-types';
38 |
39 | class $COMPONENT$ extends PureComponent {
40 | static defaultProps = {
41 | $START$
42 | };
43 |
44 | static propTypes = {
45 | };
46 |
47 | render() {
48 | return (
49 | $END$
50 | );
51 | }
52 | }
53 |
54 | export default $COMPONENT$;
55 |
56 | variables:
57 | - {name: 'COMPONENT', expression: 'fileNameWithoutExtension()'}
58 |
59 | # Pure function component
60 | # @see https://medium.com/@joshblack/stateless-components-in-react-0-14-f9798f8b992d#.qxyk0j6nc
61 | # @see https://facebook.github.io/react/docs/reusable-components.html#stateless-functions
62 | # @see https://facebook.github.io/react/blog/2015/09/10/react-v0.14-rc1.html#stateless-function-components
63 | rpfc:
64 | description: Create a pure function component
65 | tpl:
66 | next: |
67 | import React from 'react';
68 | import PropTypes from 'prop-types';
69 |
70 | function $COMPONENT$($PARAMETER$) {
71 | return (
72 | $END$
73 | );
74 | }
75 |
76 | $COMPONENT$.propTypes = {};
77 | $COMPONENT$.defaultProps = {};
78 |
79 | export default $COMPONENT$;
80 |
81 | es5: |
82 | 'use strict';
83 |
84 | var React = require('react');
85 | var PropTypes = require('prop-types');
86 |
87 | function $COMPONENT$($PARAMETER$) {
88 | return (
89 | $END$
90 | );
91 | }
92 |
93 | $COMPONENT$.propTypes = {};
94 | $COMPONENT$.defaultProps = {};
95 |
96 | module.exports = $COMPONENT$;
97 |
98 | variables:
99 | - {name: 'COMPONENT', expression: 'fileNameWithoutExtension()'}
100 | - {name: 'PARAMETER', defaultValue: '"props"'}
101 |
102 | rpfcaf:
103 | description: Create a pure function component using arrow function
104 | tpl: |
105 | import React from 'react';
106 | import PropTypes from 'prop-types';
107 |
108 | const $COMPONENT$ = ($PARAMETER$) => {
109 | return (
110 | $END$
111 | );
112 | };
113 |
114 | $COMPONENT$.propTypes = {};
115 | $COMPONENT$.defaultProps = {};
116 |
117 | export default $COMPONENT$;
118 |
119 | variables:
120 | - {name: 'COMPONENT', expression: 'fileNameWithoutExtension()'}
121 | - {name: 'PARAMETER', defaultValue: '"props"'}
122 |
123 | rcc:
124 | description: Create a React.js component
125 | tpl:
126 | next: |
127 | import React from 'react';
128 | import createReactClass from 'create-react-class';
129 | import PropTypes from 'prop-types';
130 |
131 | const $COMPONENT$ = createReactClass({
132 | render() {
133 | return (
134 | $END$
135 | );
136 | }
137 | });
138 |
139 | export default $COMPONENT$;
140 |
141 | es5: |
142 | 'use strict';
143 |
144 | var React = require('react');
145 | var createReactClass = require('create-react-class');
146 | var PropTypes = require('prop-types');
147 |
148 | var $COMPONENT$ = createReactClass({
149 | render: function() {
150 | return (
151 | $END$
152 | );
153 | }
154 | });
155 |
156 | module.exports = $COMPONENT$;
157 |
158 | variables:
159 | - {name: 'COMPONENT', expression: 'fileNameWithoutExtension()'}
160 |
161 | # Import react-dom
162 | rdom:
163 | description: import ReactDOM
164 | tpl:
165 | next: |
166 | import ReactDOM from 'react-dom';
167 | $END$
168 |
169 | es5: |
170 | var ReactDOM = require('react-dom');
171 | $END$
172 |
173 | # Nested component
174 | rccc:
175 | description: Create a sub component
176 | tpl: |
177 | $START$ = createReactClass({
178 | render: function() {
179 | return (
180 | $END$
181 | );
182 | }
183 | });
184 |
185 | variables:
186 | - {name: 'START'}
187 |
188 | # cdm
189 | cdm:
190 | description: componentDidMount
191 | tpl: |
192 | componentDidMount: function() {
193 | $END$
194 | },
195 |
196 | # cdu
197 | cdu:
198 | description: componentDidUpdate
199 | tpl: |
200 | componentDidUpdate: function(prevProps, prevState) {
201 | $END$
202 | },
203 |
204 | # cwm
205 | cwm:
206 | description: componentWillMount
207 | tpl: |
208 | componentWillMount: function() {
209 | $END$
210 | },
211 |
212 | # UNSAFE_cwm
213 | uscwm:
214 | description: UNSAFE_componentWillMount()
215 | tpl: |
216 | UNSAFE_componentWillMount: function() {
217 | $END$
218 | },
219 |
220 | # cwr
221 | cwr:
222 | description: componentWillReceiveProps
223 | tpl: |
224 | componentWillReceiveProps: function(nextProps) {
225 | $END$
226 | },
227 |
228 | # UNSAFE_componentWillReceiveProps
229 | uscwr:
230 | description: UNSAFE_componentWillReceiveProps
231 | tpl: |
232 | UNSAFE_componentWillReceiveProps: function(nextProps) {
233 | $END$
234 | },
235 |
236 | # UNSAFE_componentWillUpdate
237 | uscwu:
238 | description: UNSAFE_componentWillUpdate
239 | tpl: |
240 | UNSAFE_componentWillUpdate: function(nextProps, nextState) {
241 | $END$
242 | },
243 |
244 | # cwu
245 | cwu:
246 | description: componentWillUpdate
247 | tpl: |
248 | componentWillUpdate: function(nextProps, nextState) {
249 | $END$
250 | },
251 |
252 | #cwum
253 | cwum:
254 | description: componentWillUnmount
255 | tpl: |
256 | componentWillUnmount: function() {
257 | $END$
258 | },
259 |
260 | # getSnapshotBeforeUpdate
261 | gsbu:
262 | description: getSnapshotBeforeUpdate
263 | tpl: |
264 | getSnapshotBeforeUpdate: function(prevProps, prevState) {
265 | $END$
266 | },
267 |
268 | # componentDidCatch
269 | cdc:
270 | description: componentDidCatch
271 | tpl: |
272 | componentDidCatch: function() {
273 | $END$
274 | },
275 |
276 | # displayName
277 | dn:
278 | description: displayName
279 | tpl: "displayName: '$END$',"
280 |
281 | dnp:
282 | description: displayName as a property
283 | tpl: "$START$.displayName = '$END$';"
284 | variables:
285 | - {name: 'START'}
286 |
287 | # ReactDOM.findDOMNode
288 | fdn:
289 | description: findDOMNode
290 | tpl: findDOMNode($END$);
291 |
292 | rfdn:
293 | description: ReactDOM.findDOMNode
294 | tpl: ReactDOM.findDOMNode($END$);
295 |
296 | rcp:
297 | description: ReactDOM.createPortal
298 | tpl: ReactDOM.createPortal($START$, $END$);
299 | variables:
300 | - {name: 'START'}
301 |
302 | rhy:
303 | description: ReactDOM.hydrate
304 | tpl: ReactDOM.hydrate($START$, $END$);
305 | variables:
306 | - {name: 'START'}
307 |
308 | rucan:
309 | description: ReactDOM.unmountComponentAtNode
310 | tpl: ReactDOM.unmountComponentAtNode($END$);
311 |
312 | fup:
313 | description: forceUpdate();
314 | tpl: forceUpdate($END$);
315 |
316 | #gdp
317 | gdp:
318 | description: getDefaultProps
319 | tpl: |
320 | getDefaultProps: function() {
321 | return {
322 | $END$
323 | };
324 | },
325 |
326 | # getInitialState
327 | gis:
328 | description: getInitialState
329 | tpl: |
330 | getInitialState: function() {
331 | return {
332 | $START$: $END$
333 | };
334 | },
335 |
336 | variables:
337 | - {name: 'START'}
338 |
339 | # isMounted
340 | ism:
341 | tpl: isMounted()
342 |
343 | #
344 | props:
345 | tpl: this.props
346 |
347 | # destructuring props
348 | dprp:
349 | tpl: const { $END$ } = this.props;
350 |
351 | # set inner HTML
352 | dsih:
353 | description: dangerouslySetInnerHTML
354 | tpl: "dangerouslySetInnerHTML={{__html: '$END$'}}"
355 |
356 | # propTypes
357 | pts:
358 | description: propTypes
359 | tpl: |
360 | propTypes: {
361 | $START$: PropTypes.$END$,
362 | },
363 |
364 | variables:
365 | - {name: 'START'}
366 |
367 | # PropType
368 | pt:
369 | description: PropTypes.
370 | tpl: "$START$: PropTypes.$END$,"
371 | variables:
372 | - {name: 'START'}
373 |
374 | refs:
375 | tpl: this.refs.$END$
376 |
377 | # render
378 | ren:
379 | description: render()
380 | tpl: |
381 | render: function() {
382 | return (
383 | $END$
384 | );
385 | }
386 |
387 | # shouldComponentUpdate
388 | scu:
389 | description: shouldComponentUpdate
390 | tpl: |
391 | shouldComponentUpdate: function(nextProps, nextState) {
392 | $END$
393 | },
394 |
395 | # sst
396 | sst:
397 | description: this.setState
398 | tpl: |
399 | this.setState({
400 | $START$: $END$,
401 | });
402 | variables:
403 | - {name: 'START'}
404 |
405 | # f sst
406 | fsst:
407 | description: functional setState
408 | tpl: |
409 | this.setState((prevState) => {
410 | return $END$;
411 | });;
412 |
413 | #
414 | state:
415 | tpl: this.state.$END$
416 |
417 | # destructuring state
418 | dst:
419 | tpl: const { $END$ } = this.state;
420 |
421 | # context
422 | ct:
423 | description: contextTypes
424 | tpl: |
425 | contextTypes: {
426 | $START$: PropTypes.$END$,
427 | },
428 |
429 | variables:
430 | - {name: 'START'}
431 |
432 | # childContextTypes
433 | cct:
434 | description: childContextTypes
435 | tpl: |
436 | childContextTypes: {
437 | $START$: PropTypes.$END$,
438 | },
439 |
440 | variables:
441 | - {name: 'START'}
442 |
443 | # this.context
444 | ctx:
445 | description: this.context
446 | tpl: this.context.$END$
447 |
448 | # getChildContext
449 | gcc:
450 | description: getChildContext
451 | tpl: |
452 | getChildContext: function() {
453 | return {
454 | $START$: $END$
455 | };
456 | },
457 |
458 | variables:
459 | - {name: 'START'}
460 |
461 | # state
462 | st:
463 | description: state
464 | tpl: |
465 | state = {
466 | $START$: $END$,
467 | },
468 |
469 | variables:
470 | - {name: 'START'}
471 |
472 | # static
473 | # https://babeljs.io/blog/2015/06/07/react-on-es6-plus
474 | # https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#es7-property-initializers
475 | # static propTypes
476 | sdn:
477 | description: static displayName
478 | tpl: static displayName = '$END$';
479 |
480 | spt:
481 | description: static propTypes
482 | tpl: |
483 | static propTypes = {
484 | $START$: PropTypes.$END$,
485 | };
486 |
487 | variables:
488 | - {name: 'START'}
489 |
490 | # static defaultProps
491 | sdp:
492 | description: static defaultProps
493 | tpl: |
494 | static defaultProps = {
495 | $START$: $END$,
496 | };
497 |
498 | variables:
499 | - {name: 'START'}
500 |
501 | # static context
502 | sct:
503 | description: static contextTypes
504 | tpl: |
505 | static contextTypes = {
506 | $START$: PropTypes.$END$,
507 | };
508 |
509 | variables:
510 | - {name: 'START'}
511 |
512 | # static childContextTypes
513 | scct:
514 | description: static childContextTypes
515 | tpl: |
516 | static childContextTypes = {
517 | $START$: PropTypes.$END$,
518 | };
519 |
520 | variables:
521 | - {name: 'START'}
522 |
523 | # static getDerivedStateFromProps
524 | sgds:
525 | description: static getDerivedStateFromProps
526 | tpl: |
527 | static getDerivedStateFromProps(nextProps, prevState) {
528 | $END$
529 | },
530 |
531 | # constructor
532 | cstt:
533 | description: constructor(props)
534 | tpl: |
535 | constructor(props$START$) {
536 | super(props$END$);
537 | }
538 |
539 | variables:
540 | - {name: 'START'}
541 |
542 | # transition add-on
543 | tsn:
544 | description: transitionName
545 | tpl: transitionName="$END$"
546 |
547 | tsa:
548 | description: transitionAppear
549 | tpl: transitionAppear={$END$}
550 |
551 | tse:
552 | description: transitionEnter
553 | tpl: transitionEnter={$END$}
554 |
555 | tsl:
556 | description: transitionLeave
557 | tpl: transitionLeave={$END$}
558 |
559 | tset:
560 | description: transitionEnterTimeout
561 | tpl: transitionEnterTimeout={$END$}
562 |
563 | tslt:
564 | description: transitionLeaveTimeout
565 | tpl: transitionLeaveTimeout={$END$}
566 |
567 | tsat:
568 | description: transitionAppearTimeout
569 | tpl: transitionAppearTimeout={$END$}
570 |
571 | ### ReactDOMServer ###
572 | rdoms:
573 | description: import ReactDOMServer
574 | tpl:
575 | next: |
576 | import ReactDOMServer from 'react-dom/server';
577 | $END$
578 |
579 | es5: |
580 | var ReactDOMServer = require('react-dom/server');
581 | $END$
582 |
583 | rdsrts:
584 | description: ReactDOMServer.renderToString
585 | tpl: ReactDOMServer.renderToString($END$);
586 |
587 | rdsrtsm:
588 | description: ReactDOMServer.renderToStaticMarkup($END$)
589 | tpl: ReactDOMServer.renderToString($END$);
590 |
591 | rdsrtns:
592 | description: ReactDOMServer.renderToNodeStream
593 | tpl: ReactDOMServer.renderToNodeStream($END$);
594 |
595 | rdsrtsns:
596 | description: ReactDOMServer.renderToStaticNodeStream
597 | tpl: ReactDOMServer.renderToStaticNodeStream($END$);
598 |
599 | rsm:
600 | description: React.StrictMode
601 | tpl: |
602 |
603 | $END$
604 |
605 |
606 | # Fragments
607 | rf:
608 | description: React.Fragment
609 | tpl: |
610 |
611 | $END$
612 |
613 |
614 | # Fragments Short Syntax
615 | rfs:
616 | description: React.Fragment
617 | tpl: |
618 | <>
619 | $END$
620 | >
621 |
622 | # Ref
623 | # createRef
624 | rcr:
625 | description: React.createRef()
626 | tpl: React.createRef();
627 |
628 | # Forwarding Refs
629 | rfr:
630 | description: React.forwardRef
631 | tpl: |
632 | React.forwardRef((props, ref) => {
633 | return $END$;
634 | });
635 |
636 | # Context
637 | rcctx:
638 | description: React.createContext
639 | tpl: |
640 | const { Provider, Consumer } = React.createContext($END$);
641 |
642 | ctxprvd:
643 | description: React context Provider
644 | tpl: |
645 |
646 | $END$
647 |
648 | variables:
649 | - {name: 'START'}
650 |
651 | ctxcsm:
652 | description: React context Consumer
653 | tpl: |
654 |
655 | {value => $END$}
656 |
657 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # jetbrains-react
2 |
3 | React snippets([live templates](https://www.jetbrains.com/help/idea/2016.1/live-templates.html)) for JetBrains series editors (e.g. WebStorm, PHPStorm, IntelliJ IDEA, etc.), stolen from [sublime-react](https://github.com/reactjs/sublime-react) and [phpstorm-reactjs](https://github.com/geochatz/phpstorm-reactjs).
4 |
5 | ## Installation
6 |
7 | ### Import Automatically
8 |
9 | 1. Download [**`settings.jar`**](https://github.com/minwe/jetbrains-react/raw/master/settings.jar);
10 | 2. Click `File` -> `Importing Settings...` on your IDE menu, select `settings.jar`, then click `OK`.
11 |
12 | ### Install Manually
13 |
14 | 1. Download([save as...](https://raw.githubusercontent.com/minwe/jetbrains-react/master/jetbrains/templates/ReactJS.xml)) and copy the `jetbrains/templates/ReactJS.xml` file to your templates folder:
15 |
16 | - Windows: `\.\config\templates`
17 | - Linux: `~\.\config\templates`
18 | - OS X: `~/Library/Preferences//templates`
19 |
20 | e.g. `~/Library/Preferences/WebStorm10/templates` on OS X for WebStorm 10
21 |
22 | 2. Restart your IDE.
23 |
24 | 3. To see all templates, go to `Preferences` -> `Live Templates` and expand the `ReactJS` Template Group.
25 |
26 |
27 | ## Usage
28 |
29 | It's hard to remember shortcuts when there are a large number of options. A more efficient way is to take advantage of editor's Insert Live Template shortcut. Press `Cmd + J` and type as many letters as you want to filter the results.
30 |
31 | For example, to create a new React class, type `rcc` and press `Tab` or press `Cmd + J` and write `rcc` or `React`.
32 |
33 | **The WebStorm official blog post**:
34 |
35 | - [Working with ReactJS in WebStorm: Coding Assistance](http://blog.jetbrains.com/webstorm/2015/10/working-with-reactjs-in-webstorm-coding-assistance/)
36 |
37 | **Tips**:
38 | - [How to enable spaces in ES6 imports between braces](http://stackoverflow.com/a/41920363/425256)
39 |
40 | **Documentation of available snippets:**
41 |
42 |
43 | ### `rcls`
44 |
45 | ```js
46 | import React, { Component } from 'react';
47 | import PropTypes from 'prop-types';
48 |
49 | class $COMPONENT$ extends Component {
50 | static defaultProps = {
51 | $START$
52 | };
53 |
54 | static propTypes = {
55 | };
56 |
57 | state = {
58 | };
59 |
60 | render() {
61 | return (
62 | $END$
63 | );
64 | }
65 | }
66 |
67 | export default $COMPONENT$;
68 |
69 | ```
70 |
71 | ### `rpc`
72 |
73 | ```js
74 | import React, { PureComponent } from 'react';
75 | import PropTypes from 'prop-types';
76 |
77 | class $COMPONENT$ extends PureComponent {
78 | static defaultProps = {
79 | $START$
80 | };
81 |
82 | static propTypes = {
83 | };
84 |
85 | render() {
86 | return (
87 | $END$
88 | );
89 | }
90 | }
91 |
92 | export default $COMPONENT$;
93 |
94 | ```
95 |
96 | ### `rpfc`
97 |
98 | ```js
99 | import React from 'react';
100 | import PropTypes from 'prop-types';
101 |
102 | function $COMPONENT$($PARAMETER$) {
103 | return (
104 | $END$
105 | );
106 | }
107 |
108 | $COMPONENT$.propTypes = {};
109 | $COMPONENT$.defaultProps = {};
110 |
111 | export default $COMPONENT$;
112 |
113 | ```
114 |
115 | ### `rpfc5`
116 |
117 | ```js
118 | 'use strict';
119 |
120 | var React = require('react');
121 | var PropTypes = require('prop-types');
122 |
123 | function $COMPONENT$($PARAMETER$) {
124 | return (
125 | $END$
126 | );
127 | }
128 |
129 | $COMPONENT$.propTypes = {};
130 | $COMPONENT$.defaultProps = {};
131 |
132 | module.exports = $COMPONENT$;
133 |
134 | ```
135 |
136 | ### `rpfcaf`
137 |
138 | ```js
139 | import React from 'react';
140 | import PropTypes from 'prop-types';
141 |
142 | const $COMPONENT$ = ($PARAMETER$) => {
143 | return (
144 | $END$
145 | );
146 | };
147 |
148 | $COMPONENT$.propTypes = {};
149 | $COMPONENT$.defaultProps = {};
150 |
151 | export default $COMPONENT$;
152 |
153 | ```
154 |
155 | ### `rcc`
156 |
157 | ```js
158 | import React from 'react';
159 | import createReactClass from 'create-react-class';
160 | import PropTypes from 'prop-types';
161 |
162 | const $COMPONENT$ = createReactClass({
163 | render() {
164 | return (
165 | $END$
166 | );
167 | }
168 | });
169 |
170 | export default $COMPONENT$;
171 |
172 | ```
173 |
174 | ### `rcc5`
175 |
176 | ```js
177 | 'use strict';
178 |
179 | var React = require('react');
180 | var createReactClass = require('create-react-class');
181 | var PropTypes = require('prop-types');
182 |
183 | var $COMPONENT$ = createReactClass({
184 | render: function() {
185 | return (
186 | $END$
187 | );
188 | }
189 | });
190 |
191 | module.exports = $COMPONENT$;
192 |
193 | ```
194 |
195 | ### `rdom`
196 |
197 | ```js
198 | import ReactDOM from 'react-dom';
199 | $END$
200 |
201 | ```
202 |
203 | ### `rdom5`
204 |
205 | ```js
206 | var ReactDOM = require('react-dom');
207 | $END$
208 |
209 | ```
210 |
211 | ### `rccc`
212 |
213 | ```js
214 | $START$ = createReactClass({
215 | render() {
216 | return (
217 | $END$
218 | );
219 | }
220 | });
221 |
222 | ```
223 |
224 | ### `rccc5`
225 |
226 | ```js
227 | $START$ = createReactClass({
228 | render: function() {
229 | return (
230 | $END$
231 | );
232 | }
233 | });
234 |
235 | ```
236 |
237 | ### `cdm`
238 |
239 | ```js
240 | componentDidMount() {
241 | $END$
242 | }
243 |
244 | ```
245 |
246 | ### `cdm5`
247 |
248 | ```js
249 | componentDidMount: function() {
250 | $END$
251 | },
252 |
253 | ```
254 |
255 | ### `cdu`
256 |
257 | ```js
258 | componentDidUpdate(prevProps, prevState) {
259 | $END$
260 | }
261 |
262 | ```
263 |
264 | ### `cdu5`
265 |
266 | ```js
267 | componentDidUpdate: function(prevProps, prevState) {
268 | $END$
269 | },
270 |
271 | ```
272 |
273 | ### `cwm`
274 |
275 | ```js
276 | componentWillMount() {
277 | $END$
278 | }
279 |
280 | ```
281 |
282 | ### `cwm5`
283 |
284 | ```js
285 | componentWillMount: function() {
286 | $END$
287 | },
288 |
289 | ```
290 |
291 | ### `uscwm`
292 |
293 | ```js
294 | UNSAFE_componentWillMount() {
295 | $END$
296 | }
297 |
298 | ```
299 |
300 | ### `uscwm5`
301 |
302 | ```js
303 | UNSAFE_componentWillMount: function() {
304 | $END$
305 | },
306 |
307 | ```
308 |
309 | ### `cwr`
310 |
311 | ```js
312 | componentWillReceiveProps(nextProps) {
313 | $END$
314 | }
315 |
316 | ```
317 |
318 | ### `cwr5`
319 |
320 | ```js
321 | componentWillReceiveProps: function(nextProps) {
322 | $END$
323 | },
324 |
325 | ```
326 |
327 | ### `uscwr`
328 |
329 | ```js
330 | UNSAFE_componentWillReceiveProps(nextProps) {
331 | $END$
332 | }
333 |
334 | ```
335 |
336 | ### `uscwr5`
337 |
338 | ```js
339 | UNSAFE_componentWillReceiveProps: function(nextProps) {
340 | $END$
341 | },
342 |
343 | ```
344 |
345 | ### `uscwu`
346 |
347 | ```js
348 | UNSAFE_componentWillUpdate(nextProps, nextState) {
349 | $END$
350 | }
351 |
352 | ```
353 |
354 | ### `uscwu5`
355 |
356 | ```js
357 | UNSAFE_componentWillUpdate: function(nextProps, nextState) {
358 | $END$
359 | },
360 |
361 | ```
362 |
363 | ### `cwu`
364 |
365 | ```js
366 | componentWillUpdate(nextProps, nextState) {
367 | $END$
368 | }
369 |
370 | ```
371 |
372 | ### `cwu5`
373 |
374 | ```js
375 | componentWillUpdate: function(nextProps, nextState) {
376 | $END$
377 | },
378 |
379 | ```
380 |
381 | ### `cwum`
382 |
383 | ```js
384 | componentWillUnmount() {
385 | $END$
386 | }
387 |
388 | ```
389 |
390 | ### `cwum5`
391 |
392 | ```js
393 | componentWillUnmount: function() {
394 | $END$
395 | },
396 |
397 | ```
398 |
399 | ### `gsbu`
400 |
401 | ```js
402 | getSnapshotBeforeUpdate(prevProps, prevState) {
403 | $END$
404 | }
405 |
406 | ```
407 |
408 | ### `gsbu5`
409 |
410 | ```js
411 | getSnapshotBeforeUpdate: function(prevProps, prevState) {
412 | $END$
413 | },
414 |
415 | ```
416 |
417 | ### `cdc`
418 |
419 | ```js
420 | componentDidCatch() {
421 | $END$
422 | }
423 |
424 | ```
425 |
426 | ### `cdc5`
427 |
428 | ```js
429 | componentDidCatch: function() {
430 | $END$
431 | },
432 |
433 | ```
434 |
435 | ### `dn`
436 |
437 | ```js
438 | displayName: '$END$',
439 | ```
440 |
441 | ### `dnp`
442 |
443 | ```js
444 | $START$.displayName = '$END$';
445 | ```
446 |
447 | ### `fdn`
448 |
449 | ```js
450 | findDOMNode($END$);
451 | ```
452 |
453 | ### `rfdn`
454 |
455 | ```js
456 | ReactDOM.findDOMNode($END$);
457 | ```
458 |
459 | ### `rcp`
460 |
461 | ```js
462 | ReactDOM.createPortal($START$, $END$);
463 | ```
464 |
465 | ### `rhy`
466 |
467 | ```js
468 | ReactDOM.hydrate($START$, $END$);
469 | ```
470 |
471 | ### `rucan`
472 |
473 | ```js
474 | ReactDOM.unmountComponentAtNode($END$);
475 | ```
476 |
477 | ### `fup`
478 |
479 | ```js
480 | forceUpdate($END$);
481 | ```
482 |
483 | ### `gdp`
484 |
485 | ```js
486 | getDefaultProps() {
487 | return {
488 | $END$
489 | };
490 | }
491 |
492 | ```
493 |
494 | ### `gdp5`
495 |
496 | ```js
497 | getDefaultProps: function() {
498 | return {
499 | $END$
500 | };
501 | },
502 |
503 | ```
504 |
505 | ### `gis`
506 |
507 | ```js
508 | getInitialState() {
509 | return {
510 | $START$: $END$
511 | };
512 | }
513 |
514 | ```
515 |
516 | ### `gis5`
517 |
518 | ```js
519 | getInitialState: function() {
520 | return {
521 | $START$: $END$
522 | };
523 | },
524 |
525 | ```
526 |
527 | ### `ism`
528 |
529 | ```js
530 | isMounted()
531 | ```
532 |
533 | ### `props`
534 |
535 | ```js
536 | this.props
537 | ```
538 |
539 | ### `dprp`
540 |
541 | ```js
542 | const { $END$ } = this.props;
543 | ```
544 |
545 | ### `dsih`
546 |
547 | ```js
548 | dangerouslySetInnerHTML={{__html: '$END$'}}
549 | ```
550 |
551 | ### `pts`
552 |
553 | ```js
554 | propTypes: {
555 | $START$: PropTypes.$END$,
556 | },
557 |
558 | ```
559 |
560 | ### `pt`
561 |
562 | ```js
563 | $START$: PropTypes.$END$,
564 | ```
565 |
566 | ### `refs`
567 |
568 | ```js
569 | this.refs.$END$
570 | ```
571 |
572 | ### `ren`
573 |
574 | ```js
575 | render() {
576 | return (
577 | $END$
578 | );
579 | }
580 |
581 | ```
582 |
583 | ### `ren5`
584 |
585 | ```js
586 | render: function() {
587 | return (
588 | $END$
589 | );
590 | }
591 |
592 | ```
593 |
594 | ### `scu`
595 |
596 | ```js
597 | shouldComponentUpdate(nextProps, nextState) {
598 | $END$
599 | }
600 |
601 | ```
602 |
603 | ### `scu5`
604 |
605 | ```js
606 | shouldComponentUpdate: function(nextProps, nextState) {
607 | $END$
608 | },
609 |
610 | ```
611 |
612 | ### `sst`
613 |
614 | ```js
615 | this.setState({
616 | $START$: $END$,
617 | });
618 |
619 | ```
620 |
621 | ### `fsst`
622 |
623 | ```js
624 | this.setState((prevState) => {
625 | return $END$;
626 | });;
627 |
628 | ```
629 |
630 | ### `state`
631 |
632 | ```js
633 | this.state.$END$
634 | ```
635 |
636 | ### `dst`
637 |
638 | ```js
639 | const { $END$ } = this.state;
640 | ```
641 |
642 | ### `ct`
643 |
644 | ```js
645 | contextTypes: {
646 | $START$: PropTypes.$END$,
647 | },
648 |
649 | ```
650 |
651 | ### `cct`
652 |
653 | ```js
654 | childContextTypes: {
655 | $START$: PropTypes.$END$,
656 | },
657 |
658 | ```
659 |
660 | ### `ctx`
661 |
662 | ```js
663 | this.context.$END$
664 | ```
665 |
666 | ### `gcc`
667 |
668 | ```js
669 | getChildContext() {
670 | return {
671 | $START$: $END$
672 | };
673 | }
674 |
675 | ```
676 |
677 | ### `gcc5`
678 |
679 | ```js
680 | getChildContext: function() {
681 | return {
682 | $START$: $END$
683 | };
684 | },
685 |
686 | ```
687 |
688 | ### `st`
689 |
690 | ```js
691 | state = {
692 | $START$: $END$,
693 | },
694 |
695 | ```
696 |
697 | ### `sdn`
698 |
699 | ```js
700 | static displayName = '$END$';
701 | ```
702 |
703 | ### `spt`
704 |
705 | ```js
706 | static propTypes = {
707 | $START$: PropTypes.$END$,
708 | };
709 |
710 | ```
711 |
712 | ### `sdp`
713 |
714 | ```js
715 | static defaultProps = {
716 | $START$: $END$,
717 | };
718 |
719 | ```
720 |
721 | ### `sct`
722 |
723 | ```js
724 | static contextTypes = {
725 | $START$: PropTypes.$END$,
726 | };
727 |
728 | ```
729 |
730 | ### `scct`
731 |
732 | ```js
733 | static childContextTypes = {
734 | $START$: PropTypes.$END$,
735 | };
736 |
737 | ```
738 |
739 | ### `sgds`
740 |
741 | ```js
742 | static getDerivedStateFromProps(nextProps, prevState) {
743 | $END$
744 | },
745 |
746 | ```
747 |
748 | ### `cstt`
749 |
750 | ```js
751 | constructor(props$START$) {
752 | super(props$END$);
753 | }
754 |
755 | ```
756 |
757 | ### `tsn`
758 |
759 | ```js
760 | transitionName="$END$"
761 | ```
762 |
763 | ### `tsa`
764 |
765 | ```js
766 | transitionAppear={$END$}
767 | ```
768 |
769 | ### `tse`
770 |
771 | ```js
772 | transitionEnter={$END$}
773 | ```
774 |
775 | ### `tsl`
776 |
777 | ```js
778 | transitionLeave={$END$}
779 | ```
780 |
781 | ### `tset`
782 |
783 | ```js
784 | transitionEnterTimeout={$END$}
785 | ```
786 |
787 | ### `tslt`
788 |
789 | ```js
790 | transitionLeaveTimeout={$END$}
791 | ```
792 |
793 | ### `tsat`
794 |
795 | ```js
796 | transitionAppearTimeout={$END$}
797 | ```
798 |
799 | ### `rdoms`
800 |
801 | ```js
802 | import ReactDOMServer from 'react-dom/server';
803 | $END$
804 |
805 | ```
806 |
807 | ### `rdoms5`
808 |
809 | ```js
810 | var ReactDOMServer = require('react-dom/server');
811 | $END$
812 |
813 | ```
814 |
815 | ### `rdsrts`
816 |
817 | ```js
818 | ReactDOMServer.renderToString($END$);
819 | ```
820 |
821 | ### `rdsrtsm`
822 |
823 | ```js
824 | ReactDOMServer.renderToString($END$);
825 | ```
826 |
827 | ### `rdsrtns`
828 |
829 | ```js
830 | ReactDOMServer.renderToNodeStream($END$);
831 | ```
832 |
833 | ### `rdsrtsns`
834 |
835 | ```js
836 | ReactDOMServer.renderToStaticNodeStream($END$);
837 | ```
838 |
839 | ### `rsm`
840 |
841 | ```js
842 |
843 | $END$
844 |
845 |
846 | ```
847 |
848 | ### `rf`
849 |
850 | ```js
851 |
852 | $END$
853 |
854 |
855 | ```
856 |
857 | ### `rfs`
858 |
859 | ```js
860 | <>
861 | $END$
862 | >
863 |
864 | ```
865 |
866 | ### `rcr`
867 |
868 | ```js
869 | React.createRef();
870 | ```
871 |
872 | ### `rfr`
873 |
874 | ```js
875 | React.forwardRef((props, ref) => {
876 | return $END$;
877 | });
878 |
879 | ```
880 |
881 | ### `rcctx`
882 |
883 | ```js
884 | const { Provider, Consumer } = React.createContext($END$);
885 |
886 | ```
887 |
888 | ### `ctxprvd`
889 |
890 | ```js
891 |
892 | $END$
893 |
894 |
895 | ```
896 |
897 | ### `ctxcsm`
898 |
899 | ```js
900 |
901 | {value => $END$}
902 |
903 |
904 | ```
905 |
906 | ### `oncp`
907 |
908 | ```js
909 | onCopy={$END$}
910 | ```
911 |
912 | ### `onct`
913 |
914 | ```js
915 | onCut={$END$}
916 | ```
917 |
918 | ### `onpt`
919 |
920 | ```js
921 | onPaste={$END$}
922 | ```
923 |
924 | ### `oncpse`
925 |
926 | ```js
927 | onCompositionEnd={$END$}
928 | ```
929 |
930 | ### `oncpss`
931 |
932 | ```js
933 | onCompositionStart={$END$}
934 | ```
935 |
936 | ### `oncpsu`
937 |
938 | ```js
939 | onCompositionUpdate={$END$}
940 | ```
941 |
942 | ### `onkd`
943 |
944 | ```js
945 | onKeyDown={$END$}
946 | ```
947 |
948 | ### `onps`
949 |
950 | ```js
951 | onKeyPress={$END$}
952 | ```
953 |
954 | ### `onku`
955 |
956 | ```js
957 | onKeyUp={$END$}
958 | ```
959 |
960 | ### `onfs`
961 |
962 | ```js
963 | onFocus={$END$}
964 | ```
965 |
966 | ### `onbl`
967 |
968 | ```js
969 | onBlur={$END$}
970 | ```
971 |
972 | ### `oncg`
973 |
974 | ```js
975 | onChange={$END$}
976 | ```
977 |
978 | ### `onip`
979 |
980 | ```js
981 | onInput={$END$}
982 | ```
983 |
984 | ### `onsb`
985 |
986 | ```js
987 | onSubmit={$END$}
988 | ```
989 |
990 | ### `onc`
991 |
992 | ```js
993 | onClick={$END$}
994 | ```
995 |
996 | ### `oncm`
997 |
998 | ```js
999 | onContextMenu={$END$}
1000 | ```
1001 |
1002 | ### `ondc`
1003 |
1004 | ```js
1005 | onDoubleClick={$END$}
1006 | ```
1007 |
1008 | ### `ondg`
1009 |
1010 | ```js
1011 | onDrag={$END$}
1012 | ```
1013 |
1014 | ### `ondge`
1015 |
1016 | ```js
1017 | onDragEnd={$END$}
1018 | ```
1019 |
1020 | ### `ondgetr`
1021 |
1022 | ```js
1023 | onDragEnter={$END$}
1024 | ```
1025 |
1026 | ### `ondget`
1027 |
1028 | ```js
1029 | onDragExit={$END$}
1030 | ```
1031 |
1032 | ### `ondgl`
1033 |
1034 | ```js
1035 | onDragLeave={$END$}
1036 | ```
1037 |
1038 | ### `ondgo`
1039 |
1040 | ```js
1041 | onDragOver={$END$}
1042 | ```
1043 |
1044 | ### `ondgst`
1045 |
1046 | ```js
1047 | onDragStart={$END$}
1048 | ```
1049 |
1050 | ### `ondp`
1051 |
1052 | ```js
1053 | onDrop={$END$}
1054 | ```
1055 |
1056 | ### `onmd`
1057 |
1058 | ```js
1059 | onMouseDown={$END$}
1060 | ```
1061 |
1062 | ### `onme`
1063 |
1064 | ```js
1065 | onMouseEnter={$END$}
1066 | ```
1067 |
1068 | ### `onml`
1069 |
1070 | ```js
1071 | onMouseLeave={$END$}
1072 | ```
1073 |
1074 | ### `onmm`
1075 |
1076 | ```js
1077 | onMouseMove={$END$}
1078 | ```
1079 |
1080 | ### `onmot`
1081 |
1082 | ```js
1083 | onMouseOut={$END$}
1084 | ```
1085 |
1086 | ### `onmov`
1087 |
1088 | ```js
1089 | onMouseOver={$END$}
1090 | ```
1091 |
1092 | ### `onmu`
1093 |
1094 | ```js
1095 | onMouseUp={$END$}
1096 | ```
1097 |
1098 | ### `onsl`
1099 |
1100 | ```js
1101 | onSelect={$END$}
1102 | ```
1103 |
1104 | ### `ontc`
1105 |
1106 | ```js
1107 | onTouchCancel={$END$}
1108 | ```
1109 |
1110 | ### `onte`
1111 |
1112 | ```js
1113 | onTouchEnd={$END$}
1114 | ```
1115 |
1116 | ### `ontm`
1117 |
1118 | ```js
1119 | onTouchMove={$END$}
1120 | ```
1121 |
1122 | ### `onts`
1123 |
1124 | ```js
1125 | onTouchStart={$END$}
1126 | ```
1127 |
1128 | ### `onsl`
1129 |
1130 | ```js
1131 | onScroll={$END$}
1132 | ```
1133 |
1134 | ### `onwl`
1135 |
1136 | ```js
1137 | onWheel={$END$}
1138 | ```
1139 |
1140 | ### `onabt`
1141 |
1142 | ```js
1143 | onAbort={$END$}
1144 | ```
1145 |
1146 | ### `oncpl`
1147 |
1148 | ```js
1149 | onCanPlay={$END$}
1150 | ```
1151 |
1152 | ### `oncpt`
1153 |
1154 | ```js
1155 | onCanPlayThrough={$END$}
1156 | ```
1157 |
1158 | ### `ondc`
1159 |
1160 | ```js
1161 | onDurationChange={$END$}
1162 | ```
1163 |
1164 | ### `onempt`
1165 |
1166 | ```js
1167 | onEmptied={$END$}
1168 | ```
1169 |
1170 | ### `onekpt`
1171 |
1172 | ```js
1173 | onEncrypted={$END$}
1174 | ```
1175 |
1176 | ### `onend`
1177 |
1178 | ```js
1179 | onEnded={$END$}
1180 | ```
1181 |
1182 | ### `onldd`
1183 |
1184 | ```js
1185 | onLoadedData={$END$}
1186 | ```
1187 |
1188 | ### `onldmd`
1189 |
1190 | ```js
1191 | onLoadedMetadata={$END$}
1192 | ```
1193 |
1194 | ### `onls`
1195 |
1196 | ```js
1197 | onLoadStart={$END$}
1198 | ```
1199 |
1200 | ### `onpaus`
1201 |
1202 | ```js
1203 | onPause={$END$}
1204 | ```
1205 |
1206 | ### `opl`
1207 |
1208 | ```js
1209 | onPlay={$END$}
1210 | ```
1211 |
1212 | ### `onplg`
1213 |
1214 | ```js
1215 | onPlaying={$END$}
1216 | ```
1217 |
1218 | ### `onpgs`
1219 |
1220 | ```js
1221 | onProgress={$END$}
1222 | ```
1223 |
1224 | ### `onrc`
1225 |
1226 | ```js
1227 | onRateChange={$END$}
1228 | ```
1229 |
1230 | ### `onsked`
1231 |
1232 | ```js
1233 | onSeeked={$END$}
1234 | ```
1235 |
1236 | ### `onskin`
1237 |
1238 | ```js
1239 | onSeeking={$END$}
1240 | ```
1241 |
1242 | ### `onstd`
1243 |
1244 | ```js
1245 | onStalled={$END$}
1246 | ```
1247 |
1248 | ### `onsupd`
1249 |
1250 | ```js
1251 | onSuspend={$END$}
1252 | ```
1253 |
1254 | ### `ontu`
1255 |
1256 | ```js
1257 | onTimeUpdate={$END$}
1258 | ```
1259 |
1260 | ### `onvc`
1261 |
1262 | ```js
1263 | onVolumeChange={$END$}
1264 | ```
1265 |
1266 | ### `onwt`
1267 |
1268 | ```js
1269 | onWaiting={$END$}
1270 | ```
1271 |
1272 | ### `onld`
1273 |
1274 | ```js
1275 | onLoad={$END$}
1276 | ```
1277 |
1278 | ### `onerr`
1279 |
1280 | ```js
1281 | onError={$END$}
1282 | ```
1283 |
1284 | ### `onas`
1285 |
1286 | ```js
1287 | onAnimationStart={$END$}
1288 | ```
1289 |
1290 | ### `onae`
1291 |
1292 | ```js
1293 | onAnimationEnd={$END$}
1294 | ```
1295 |
1296 | ### `onai`
1297 |
1298 | ```js
1299 | onAnimationIteration={$END$}
1300 | ```
1301 |
1302 | ### `ontse`
1303 |
1304 | ```js
1305 | onTransitionEnd={$END$}
1306 | ```
1307 |
1308 |
1309 |
1310 |
--------------------------------------------------------------------------------
/jetbrains/templates/ReactJS.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
543 |
544 |
545 |
546 |
547 |
548 |
549 |
550 |
556 |
557 |
558 |
559 |
560 |
561 |
562 |
563 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
623 |
624 |
625 |
626 |
627 |
628 |
629 |
630 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
729 |
730 |
731 |
732 |
733 |
734 |
735 |
736 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
755 |
756 |
757 |
758 |
759 |
760 |
761 |
762 |
763 |
769 |
770 |
771 |
772 |
773 |
774 |
775 |
776 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
802 |
808 |
809 |
810 |
811 |
812 |
813 |
814 |
815 |
816 |
822 |
823 |
824 |
825 |
826 |
827 |
828 |
829 |
830 |
836 |
837 |
838 |
839 |
840 |
841 |
842 |
843 |
849 |
850 |
851 |
852 |
853 |
854 |
855 |
856 |
857 |
863 |
864 |
865 |
866 |
867 |
868 |
869 |
870 |
871 |
877 |
878 |
879 |
880 |
881 |
882 |
883 |
884 |
885 |
891 |
892 |
893 |
894 |
895 |
896 |
897 |
898 |
904 |
905 |
906 |
907 |
908 |
909 |
910 |
911 |
912 |
918 |
919 |
920 |
921 |
922 |
923 |
924 |
925 |
926 |
932 |
933 |
934 |
935 |
936 |
937 |
938 |
939 |
940 |
946 |
947 |
948 |
949 |
950 |
951 |
952 |
953 |
954 |
960 |
961 |
962 |
963 |
964 |
965 |
966 |
967 |
973 |
974 |
975 |
976 |
977 |
978 |
979 |
980 |
981 |
987 |
988 |
989 |
990 |
991 |
992 |
993 |
994 |
1000 |
1001 |
1002 |
1003 |
1004 |
1005 |
1006 |
1007 |
1013 |
1014 |
1015 |
1016 |
1017 |
1018 |
1019 |
1020 |
1026 |
1027 |
1028 |
1029 |
1030 |
1031 |
1032 |
1033 |
1039 |
1040 |
1041 |
1042 |
1043 |
1044 |
1045 |
1046 |
1052 |
1053 |
1054 |
1055 |
1056 |
1057 |
1058 |
1059 |
1065 |
1066 |
1067 |
1068 |
1069 |
1070 |
1071 |
1072 |
1078 |
1079 |
1080 |
1081 |
1082 |
1083 |
1084 |
1085 |
1091 |
1092 |
1093 |
1094 |
1095 |
1096 |
1097 |
1098 |
1104 |
1105 |
1106 |
1107 |
1108 |
1109 |
1110 |
1111 |
1117 |
1118 |
1119 |
1120 |
1121 |
1122 |
1123 |
1124 |
1130 |
1131 |
1132 |
1133 |
1134 |
1135 |
1136 |
1137 |
1143 |
1144 |
1145 |
1146 |
1147 |
1148 |
1149 |
1150 |
1156 |
1157 |
1158 |
1159 |
1160 |
1161 |
1162 |
1163 |
1169 |
1170 |
1171 |
1172 |
1173 |
1174 |
1175 |
1176 |
1182 |
1183 |
1184 |
1185 |
1186 |
1187 |
1188 |
1189 |
1195 |
1196 |
1197 |
1198 |
1199 |
1200 |
1201 |
1202 |
1208 |
1209 |
1210 |
1211 |
1212 |
1213 |
1214 |
1215 |
1221 |
1222 |
1223 |
1224 |
1225 |
1226 |
1227 |
1228 |
1234 |
1235 |
1236 |
1237 |
1238 |
1239 |
1240 |
1241 |
1242 |
1248 |
1249 |
1250 |
1251 |
1252 |
1253 |
1254 |
1255 |
1261 |
1262 |
1263 |
1264 |
1265 |
1266 |
1267 |
1268 |
1274 |
1275 |
1276 |
1277 |
1278 |
1279 |
1280 |
1281 |
1287 |
1288 |
1289 |
1290 |
1291 |
1292 |
1293 |
1294 |
1300 |
1301 |
1302 |
1303 |
1304 |
1305 |
1306 |
1307 |
1313 |
1314 |
1315 |
1316 |
1317 |
1318 |
1319 |
1320 |
1326 |
1327 |
1328 |
1329 |
1330 |
1331 |
1332 |
1333 |
1339 |
1340 |
1341 |
1342 |
1343 |
1344 |
1345 |
1346 |
1352 |
1353 |
1354 |
1355 |
1356 |
1357 |
1358 |
1359 |
1365 |
1366 |
1367 |
1368 |
1369 |
1370 |
1371 |
1372 |
1378 |
1379 |
1380 |
1381 |
1382 |
1383 |
1384 |
1385 |
1391 |
1392 |
1393 |
1394 |
1395 |
1396 |
1397 |
1398 |
1404 |
1405 |
1406 |
1407 |
1408 |
1409 |
1410 |
1411 |
1417 |
1418 |
1419 |
1420 |
1421 |
1422 |
1423 |
1424 |
1430 |
1431 |
1432 |
1433 |
1434 |
1435 |
1436 |
1437 |
1443 |
1444 |
1445 |
1446 |
1447 |
1448 |
1449 |
1450 |
1456 |
1457 |
1458 |
1459 |
1460 |
1461 |
1462 |
1463 |
1469 |
1470 |
1471 |
1472 |
1473 |
1474 |
1475 |
1476 |
1482 |
1483 |
1484 |
1485 |
1486 |
1487 |
1488 |
1489 |
1495 |
1496 |
1497 |
1498 |
1499 |
1500 |
1501 |
1502 |
1508 |
1509 |
1510 |
1511 |
1512 |
1513 |
1514 |
1515 |
1521 |
1522 |
1523 |
1524 |
1525 |
1526 |
1527 |
1528 |
1534 |
1535 |
1536 |
1537 |
1538 |
1539 |
1540 |
1541 |
1547 |
1548 |
1549 |
1550 |
1551 |
1552 |
1553 |
1554 |
1560 |
1561 |
1562 |
1563 |
1564 |
1565 |
1566 |
1567 |
1573 |
1574 |
1575 |
1576 |
1577 |
1578 |
1579 |
1580 |
1586 |
1587 |
1588 |
1589 |
1590 |
1591 |
1592 |
1593 |
1599 |
1600 |
1601 |
1602 |
1603 |
1604 |
1605 |
1606 |
1612 |
1613 |
1614 |
1615 |
1616 |
1617 |
1618 |
1619 |
1625 |
1626 |
1627 |
1628 |
1629 |
1630 |
1631 |
1632 |
1638 |
1639 |
1640 |
1641 |
1642 |
1643 |
1644 |
1645 |
1651 |
1652 |
1653 |
1654 |
1655 |
1656 |
1657 |
1658 |
1664 |
1665 |
1666 |
1667 |
1668 |
1669 |
1670 |
1671 |
1677 |
1678 |
1679 |
1680 |
1681 |
1682 |
1683 |
1684 |
1690 |
1691 |
1692 |
1693 |
1694 |
1695 |
1696 |
1697 |
1703 |
1704 |
1705 |
1706 |
1707 |
1708 |
1709 |
1710 |
1716 |
1717 |
1718 |
1719 |
1720 |
1721 |
1722 |
1723 |
1729 |
1730 |
1731 |
1732 |
1733 |
1734 |
1735 |
1736 |
1742 |
1743 |
1744 |
1745 |
1746 |
1747 |
1748 |
1749 |
1755 |
1756 |
1757 |
1758 |
1759 |
1760 |
1761 |
1762 |
1768 |
1769 |
1770 |
1771 |
1772 |
1773 |
1774 |
1775 |
1781 |
1782 |
1783 |
1784 |
1785 |
1786 |
1787 |
1788 |
1794 |
1795 |
1796 |
1797 |
1798 |
1799 |
1800 |
1801 |
1807 |
1808 |
1809 |
1810 |
1811 |
1812 |
1813 |
1814 |
1820 |
1821 |
1822 |
1823 |
1824 |
1825 |
1826 |
1827 |
1833 |
1834 |
1835 |
1836 |
1837 |
1838 |
1839 |
1840 |
1846 |
1847 |
1848 |
1849 |
1850 |
1851 |
1852 |
1853 |
1859 |
1860 |
1861 |
1862 |
1863 |
1864 |
1865 |
1866 |
1872 |
1873 |
1874 |
1875 |
1876 |
1877 |
1878 |
1879 |
1885 |
1886 |
1887 |
1888 |
1889 |
1890 |
1891 |
1892 |
1898 |
1899 |
1900 |
1901 |
1902 |
1903 |
1904 |
1905 |
1911 |
1912 |
1913 |
1914 |
1915 |
1916 |
1917 |
1918 |
1924 |
1925 |
1926 |
1927 |
1928 |
1929 |
1930 |
1931 |
1937 |
1938 |
1939 |
1940 |
1941 |
1942 |
1943 |
1944 |
1950 |
1951 |
1952 |
1953 |
1954 |
1955 |
1956 |
1957 |
1963 |
1964 |
1965 |
1966 |
1967 |
1968 |
1969 |
1970 |
1976 |
1977 |
1978 |
1979 |
1980 |
1981 |
1982 |
1983 |
1989 |
1990 |
1991 |
1992 |
1993 |
1994 |
1995 |
1996 |
2002 |
2003 |
2004 |
2005 |
2006 |
2007 |
2008 |
2009 |
2015 |
2016 |
2017 |
2018 |
2019 |
2020 |
2021 |
2022 |
2028 |
2029 |
2030 |
2031 |
2032 |
2033 |
2034 |
2035 |
2041 |
2042 |
2043 |
2044 |
2045 |
2046 |
2047 |
2048 |
2054 |
2055 |
2056 |
2057 |
2058 |
2059 |
2060 |
2061 |
2067 |
2068 |
2069 |
2070 |
2071 |
2072 |
2073 |
2074 |
2080 |
2081 |
2082 |
2083 |
2084 |
2085 |
2086 |
2087 |
2093 |
2094 |
2095 |
2096 |
2097 |
2098 |
2099 |
2100 |
2106 |
2107 |
2108 |
2109 |
2110 |
2111 |
2112 |
2113 |
2119 |
2120 |
2121 |
2122 |
2123 |
2124 |
2125 |
2126 |
--------------------------------------------------------------------------------