react-native-hello

1.0.0 • Public • Published

Native Module: react-native-hello

Getting started to write React Native bridge module for Android.

How to Run the Example

cd Example
npm install
react-native run-android

How to Use the Module

  1. Create a new React Native project:

    react-native init NewProject
  2. Add the local module to dependencies in package.json:

    "dependencies"{
        "react": "16.0.0-alpha.6",
        "react-native": "0.43.3",
        "react-native-hello":"file:../"
    },
  3. Link dependencies:

    react-native link
  4. Use the module in index.android.js:

    import MyModule from 'react-native-hello';
     
    const onButtonPress = () => {
        MyModule.alert('Hello World');
    };

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i react-native-hello

      Weekly Downloads

      2

      Version

      1.0.0

      License

      MIT

      Last publish

      Collaborators

      • yushulx