Node.js for React Native - onlinepractice/react-native GitHub Wiki
Everything about Node for React Native framework
What is Node
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world. ref: https://nodejs.org/en/
Node vs npm vs nvm?
Node is the short form of Node.js npm (node package manager) is a CLI for managing your node modules nvm is node version manager which means you can install multiple versions of node and point one particular version for your app
What is React Native?
React native framework was made public by Facebook (https://facebook.github.io/react-native/)
Where is Node involved in react native app?
React Native uses Node.js, a JavaScript runtime, to build your JavaScript code. ... This uses the CLI tool to create a starter project containing everything you need to build and run a React Native app.
Node installation on different operating systems
Debian and Ubuntu based Linux distributions (change setup_6 to setup_8 for Node 8)
for NodeJs 6: curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
for NodeJs 8: curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
install: sudo apt-get install -y nodejs
Enterprise Linux and Fedora (Including Red Hat® Enterprise Linux® / RHEL, CentOS and Fedora)
for NodeJs 6: curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -
for NodeJs 6: curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
install: sudo yum -y install nodejs
note: refer this https://nodejs.org/en/download/package-manager/ for details
How to install react native using npm?
a. use npm to install the create-react-native-app command line utility: npm install -g create-react-native-app b. create-react-native-app e.g.: create-react-native-app postafact c. cd < e.g.: cd postafact d. npm start