├── 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 | 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 | 16 | 30 | 45 | 60 | 75 | 89 | 103 | 116 | 129 | 143 | 157 | 170 | 183 | 196 | 209 | 222 | 235 | 248 | 261 | 274 | 287 | 300 | 313 | 326 | 339 | 352 | 365 | 378 | 391 | 404 | 417 | 430 | 443 | 456 | 470 | 483 | 496 | 510 | 524 | 537 | 550 | 563 | 576 | 590 | 604 | 617 | 630 | 643 | 656 | 670 | 684 | 697 | 710 | 723 | 736 | 749 | 763 | 776 | 789 | 802 | 816 | 830 | 843 | 857 | 871 | 885 | 898 | 912 | 926 | 940 | 954 | 967 | 981 | 994 | 1007 | 1020 | 1033 | 1046 | 1059 | 1072 | 1085 | 1098 | 1111 | 1124 | 1137 | 1150 | 1163 | 1176 | 1189 | 1202 | 1215 | 1228 | 1242 | 1255 | 1268 | 1281 | 1294 | 1307 | 1320 | 1333 | 1346 | 1359 | 1372 | 1385 | 1398 | 1411 | 1424 | 1437 | 1450 | 1463 | 1476 | 1489 | 1502 | 1515 | 1528 | 1541 | 1554 | 1567 | 1580 | 1593 | 1606 | 1619 | 1632 | 1645 | 1658 | 1671 | 1684 | 1697 | 1710 | 1723 | 1736 | 1749 | 1762 | 1775 | 1788 | 1801 | 1814 | 1827 | 1840 | 1853 | 1866 | 1879 | 1892 | 1905 | 1918 | 1931 | 1944 | 1957 | 1970 | 1983 | 1996 | 2009 | 2022 | 2035 | 2048 | 2061 | 2074 | 2087 | 2100 | 2113 | 2126 | --------------------------------------------------------------------------------