工欲善其事, its prerequisite.
Reactnative as a library of Facebook contributions, there's something customized. Official recommendation Atom+Nuclide , then try Atom. During the test, the Atom editor was particularly stuck for unknown reasons after installing nuclide, so some other plugins were tested. Let me make a list of some of the necessary ones.
1. Atom
Download the Atom editor, install, and refer to the documentation.
2. Atom-react
Plugin atom-react, this plugin is very good!
Click Atom Install Shell Commands , install the shell command, and then enter
install react
Can be installed, or directly search the installation, Command+, select Install Search.
- Syntax highlighting (Syntax highlighting);
- Indentation (indentation), search plug-in
Auto Indent ;
Search plugin
Command+Shift+P , direct input
Intent , reference video.
Code folding (folding);
Fragment hint (Snippets);
The abbreviation for the fragment hint needs to conform to the file suffix name jsx, js .
JSX format (JSX reformatting), plugin search Reformat , select Reformat JSX .
HTML to JSX conversion (HTML to JSX conversion), convert code style;
Automatic completion (Autocomplete);
Auto-closing label (Automatic Closing tag);
3. Jump
Jump is very important for debugging code and reading code, of course, using plug-ins, need to download hyperclick and js-hyperclick , you can jump to the required classes and methods by reference.
4. Comment Plugin
Comments are important for writing and reading code, and it is recommended docblockr that you search for them.
/** * 滚动条, fractionalPosition滚动条长度, progressBarSize当前大小 * @param {size:滚动条大小} {progress:过程} * @return {View} [里外两层视图, 背景白框黑底, 显示白框] */
5. Type display
Atom-typescript type display and other powerful features, refer to the documentation.
6. Managing Configurations
After installing a lot of packages, it can be managed by the editor; If you want to restore the initial, delete .atom .
OK, now you can write the Reactnative program, if you find other plugins, I will continue to update.
Enjoy it.
Reactnative's Atom Editor