ReactNative 代碼智能提醒 (Webstrom live template)
git clone https://github.com/virtoolswebplayer/ReactNative-LiveTemplate
說明
ReactNative的代碼模板,包括:
組件名稱
Api 名稱
所有StyleSheets屬性
React組件
安裝
方法一
file -> import settings -> ReactNative.jar
方法二
Mac下安裝
將ReactNative.xml復(fù)制到 ~/Library/Preferences/WebStorm11/templates
重啟 WebStrom
使用方法
通用方法
直接輸入組件 或 Api 名稱的首字母, 比如想要 View ,只要輸入 V自動提示代碼里就會看到 View
StyleSheet屬性提示
首先 按下 command + J , 然后輸入屬性名的 首字母
如: 輸入 f ,會自動提示 fontSize,fontFamily,fontStyle...等等