sublime中支持React的Snippets片段插件--ReactJS
sublime-reactSnippets for ReactJS. This package used to provide JSX syntax highlighting and has been DEPRECATED in favor of babel/babel-sublime. InstallationInstall the React package via Sublime’s Package Manager You will need the Sublime Package Manager.
UsageSyntax highlightingSyntax highlighting is no longer provided by this packages. We recommend that you use (babel-sublime) instead. SnippetsIt’s easy! Simply activate snippets by typing a mnemonic followed by TAB. 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.
ContributingRebuilding the docsAfter making changes to snippet files,run Contributor License AgreementContributions are very welcome,but we ask that you please fill out our CLA in order for us to accept your pull request. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |