$ npm install react-native-hello-view --save
$ react-native link react-native-hello-view
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-hello-view
and addRNHelloView.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNHelloView.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
import RNHelloView from 'react-native-hello-view';
// TODO: What to do with the module?
RNHelloView;