I met the React Native
React Native (RN for short) is a cross-platform mobile application development framework that Facebook opened source in April 2015. It is a derivative of Facebook’s React UI framework on the Native mobile application platform. It currently supports iOS and Android platforms. RN uses the Javascript language, HTML-like JSX, and CSS to develop mobile applications, so technicians familiar with Web front-end development can enter mobile application development with minimal learning. (Baidu Encyclopedia)
A few thoughts as an iOS developer:
React Native is a bit of a hassle to learn. You need to learn JS, Html, and ES6 syntax first. Then you can learn React Native developmentReact Native is a bit of a hassle. You need to learn JAVASCRIPT, Html, ES6 syntax and React Native first. Then you can start developing React Native.- If React Native is used as the main developer, some apps with few animation effects and list displays can be developed. Or as components develop interfaces that are common to both ends
- JS and native interaction is asynchronous, some interaction communication is more troublesome, some components linkage effect is not easy to achieve
- React Native is still not perfect and the documentation is not complete. Although Facebook has not promoted React Native vigorously, the domestic demand for React Native is relatively high and the prospect is good
To do a good job, he must sharpen his tools
Development environment setup
RN versions vary greatly, so the following tools should be used to install all the latest versions; otherwise, unexpected problems may occur between the old and new versions
Install the Node
Use Homebrew to install Node.js, just install the latest one
After installing Node, it is recommended that you set up an NPM image to speed up the process (or use the science Web tool). Note: Do not use CNPM! CNPM installed module path is strange, packager can not correctly identify! npm config set registry https://registry.npm.taobao.org –global npm config set disturl https://npm.taobao.org/dist –global
Yarn and React Native command line tools
Yarn is a tool provided by Facebook to replace NPM and speed up the download of Node modules. React Native’s command-line tools perform tasks such as creating, initializing, updating projects, and running the Packager service. npm install -g yarn react-native-cli
After installing YARN, set the image source as follows: yarn config set registry https://registry.npm.taobao.org –global yarn config set disturl https://npm.taobao.org/dist –global
Developing ReactNative naturally requires an editor
-
Sublime Text 3
As an initial exercise to recommend Sublime Text 3, you can use the following code to install the Package Control for Sublime Text and then search the Package Control to install the plugins: Emmet: React-native snippets for CSS and HTML: 2. ###### WebStorm code can be used for the actual development of WebStorm. It is very convenient to write and run the WebStorm code. ReactNative Developing mobile apps with ReactNative in WebStorm Working with ReactJS in WebStorm Coding Assistance 3. ###### Atom Atom is an official recommended development tool for Facebook. Atom can be used to Debug RN code directly. This is still a lot easier to debug than using Chrome and I’ve been using Atom for my latest development