From 33e463d52382eb8356ec6228fabb5db361ada7ba Mon Sep 17 00:00:00 2001 From: Henrik Date: Sun, 17 Sep 2017 19:35:55 +0200 Subject: [PATCH] Updated README.md installation instructions (#56) Updated the documentation to reflect the changes in React Native, as MainApplication is being used instead of MainActivity in the current version of React Native. --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7e37144..fc89879 100644 --- a/README.md +++ b/README.md @@ -45,25 +45,26 @@ include ':react-native-dialogs' project(':react-native-dialogs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialogs/android') ``` -Next, you need to change the `MainActivity` of your app to register `ReactNativeDialogsPackage` : +Next, you need to change the `MainApplication` of your app to register `ReactNativeDialogsPackage` : ```java -import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage; +// ... Other imports +import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage; // <-- Add this import. //... -public class MainActivity extends ReactActivity { +public class MainApplication extends ReactActivity { //... @Override protected List getPackages() { return Arrays.asList( new MainReactPackage(), - new ReactNativeDialogsPackage() // add this manager + new ReactNativeDialogsPackage() // <-- Add this package. ); } } ``` -See [this changelog](https://github.com/aakashns/react-native-dialogs-example/commit/52cac27756963bcd2f4fdcd039e1a78028bb0abd) for reference. +See [this changelog](https://github.com/aakashns/react-native-dialogs-example/commit/52cac27756963bcd2f4fdcd039e1a78028bb0abd) for reference(Earlier versions of React native used MainActivity instead of MainApplication). Now you're finally ready to start using module in your React Native application. See [this changelog](https://github.com/aakashns/react-native-dialogs-example/commit/2d8e02c22275479d2fbbb89f99dcb846834bec9d) for an example that uses `DialogAndroid`.