npm

react-native-demo-module

1.0.6 • Public • Published

react-native-demo-module

Getting started

$ npm install react-native-demo-module --save

Mostly automatic installation

$ react-native link react-native-demo-module

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-demo-module and add RNDemoModule.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNDemoModule.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNDemoModulePackage; to the imports at the top of the file
  • Add new RNDemoModulePackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-demo-module'
    project(':react-native-demo-module').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-demo-module/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-demo-module')
    

Windows

Read it! :D

  1. In Visual Studio add the RNDemoModule.sln in node_modules/react-native-demo-module/windows/RNDemoModule.sln folder to their solution, reference from their app.
  2. Open up your MainPage.cs app
  • Add using Demo.Module.RNDemoModule; to the usings at the top of the file
  • Add new RNDemoModulePackage() to the List<IReactPackage> returned by the Packages method

Usage

import RNDemoModule from 'react-native-demo-module';

// TODO: What to do with the module?
RNDemoModule;

Readme

Keywords

Package Sidebar

Install

npm i react-native-demo-module

Weekly Downloads

1

Version

1.0.6

License

none

Unpacked Size

33.1 kB

Total Files

20

Last publish

Collaborators

  • snehalhumne