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
  • 39 minutes ago
  • 3 years ago

Installs

  • Total 110K
  • Win 41K
  • OS X 53K
  • Linux 16K
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 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9
Windows 62 56 98 111 105 98 97 55 53 70 94 99 99 97 51 46 85 89 107 81 74 53 77 71 108 111 93 113 62 71 98 99 92 108 108 60 58 106 97 116 113 126 65 70 97 112
OS X 41 45 68 76 88 105 94 49 68 65 77 75 82 92 34 40 61 66 102 71 78 48 48 79 91 97 111 122 53 54 75 89 93 100 93 69 66 107 110 115 112 89 61 62 89 98
Linux 15 26 24 38 30 26 31 18 22 31 25 40 42 37 18 26 27 25 42 38 36 14 13 20 28 33 44 33 21 26 37 45 35 27 33 24 31 33 27 41 34 30 16 17 31 26

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.