文章目录

0、下载安装nodejs,将在安装过程中会安装node和npm

  国内下载nodejs-V4.1.0.pkg  国外请自行选择版本

1、安装React Native

  1、未安装 Homebrew ,请进行安装。

  2、通过 Homebrew 安装 watchman 和 flow

1
2
$ brew install watchman
$ brew install flow

解决 Installing react-native package from npm... 问题

1
2
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist

react 安装
首先安装 nodejs , 然后再进行安装
$ npm install -g create-react-app //
$ create-react-app my-app //创建项目

go2Shell: Mac 上的 finder 命令行工具

package.json 第三方相关的库 安装在 node_modules, 里面的内容由此文件决定。

$ npm install // 安装 node_modules

npm install –save redux // 往项目中安装 redux

npm uninstall –save redux // 从项目中移除 redux

如何开发自己 npm 模块

public 里面的 index 是入口文件

文章目录