react-navite development tools

When you come into contact with a new language, the first is to look at the development documentation, and the second is to develop the tools. But RN is a framework open sourced by facebook. What should we use to write our code to feel cool?

NO1: Of course it is Sublime , the world's most popular script editor

 


sublime3

We need to load several plugins for sublime before developing RN.

1、package controller

Operation: Use the shortcut key   ctrl+` or   View>Show Console   console, copy the following content and press Enter, restart sublime after the installation is successful

sublime3

import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

sublime2

import urllib2,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')

Next we press the shortcut key shift + commad + p to open the package controller

 


 

Enter package controller:install package and press Enter, then enter the plugin we want to install it. Very convenient.

2、React-native-snippets


 

This plugin quickly builds an RN development environment and has some lifecycle syntax. (For details, see https://packagecontrol.io/packages/react-native-snippets )

3、sublime-react

RN is based on React.js, with JSX syntax highlighting!

4、babel

The babel plugin supports ES6 syntax and JSX syntax and looks more comfortable than sublime-react. Problems will also be prompted.


 

At this point, the development tool environment of react-native is completed!

NO2:Atom

 


Atom

 

On June 15th, Atom1.0 was officially released. In March, Facebook announced to develop and open source an Atom-based IDE--nuclide for React and React- native . I believe that a powerful RN editor will come out soon. (RN dog gospel!) (After testing, Atom will become very stuck after installing nuclide, and it is not recommended for you to try it now! Please wait patiently)

The operation process of Atom is basically the same as that of Sublime. There is no explanation here!

Next will start the first small project: react-native to develop a login interface.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326316287&siteId=291194637