ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

React​JS

by facebookarchive ST2/ST3 Top 100

Sublime Text helpers for React. Syntax highlighting DEPRECATED in favor of babel/babel-sublime

Details

  • 2015.05.11.19.44.00
  • github.​com
  • github.​com
  • 2 years ago
  • 55 minutes ago
  • 3 years ago

Installs

  • Total 114K
  • Win 43K
  • OS X 55K
  • Linux 16K
May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10
Windows 33 80 100 88 56 63 91 111 83 95 102 45 43 84 99 109 93 93 45 69 78 75 106 80 51 36 53 79 98 98 90 98 63 56 98 111 105 98 97 55 53 70 94 99 99 97
OS X 21 98 84 79 45 43 96 79 67 75 102 45 50 89 76 74 106 88 26 55 96 87 86 95 70 41 35 77 80 84 93 77 46 45 68 76 88 105 94 49 68 65 77 75 82 92
Linux 11 33 32 28 22 35 32 26 34 25 23 17 16 30 27 26 21 29 21 22 22 28 37 22 19 19 24 24 40 40 37 30 18 26 24 38 30 26 31 18 22 31 25 40 42 37

Readme

Source
raw.​githubusercontent.​com

sublime-react

Snippets for ReactJS. This package used to provide JSX syntax highlighting and has been DEPRECATED in favor of babel/babel-sublime.

alt tag

Installation

Install the React package via Sublime's Package Manager

You will need the Sublime Package Manager.

  • Open the command palette: ⌘+shift+p on MacOS/Linux, ctrl+shift+p on Windows

  • type install, select Package Control: Install Package

  • type React, select ReactJS

Usage

Syntax highlighting

Syntax highlighting is no longer provided by this packages. We recommend that you use (babel-sublime) instead.

Snippets

It's easy! Simply activate snippets by typing a mnemonic followed by TAB.

alt tag

Snippets are available for both JSX and CJSX (React CoffeeScript).

Documentation of available snippets (JSX):

cdm→  componentDidMount: fn() { ... }

   cdup→  componentDidUpdate: fn(pp, ps) { ... }

     cs→  var cx = React.addons.classSet;

    cwm→  componentWillMount: fn() { ... }

    cwr→  componentWillReceiveProps: fn(np) { ... }

    cwu→  componentWillUpdate: fn(np, ns) { ... }

   cwun→  componentWillUnmount: fn() { ... }

     cx→  cx({ ... })

    fdn→  React.findDOMNode(...)

    fup→  forceUpdate(...)

    gdp→  getDefaultProps: fn() { return {...} } 

    gis→  getInitialState: fn() { return {...} } 

    ism→  isMounted()

  props→  this.props.

     pt→  propTypes { ... }

    rcc→  component skeleton

   refs→  this.refs.

    ren→  render: fn() { return ... }

    scu→  shouldComponentUpdate: fn(np, ns) { ... }

    sst→  this.setState({ ... })

  state→  this.state.

Contributing

Rebuilding the docs

After making changes to snippet files, run npm install && npm run build-docs to automatically generate this document from source. Do not make changes to README.md directly.

Contributor License Agreement

Contributions are very welcome, but we ask that you please fill out our CLA in order for us to accept your pull request.