Ramaraju
Ramaraju

Reputation: 614

Integrate android project into React Native

i am new to react native...... I had a developed android project and now i want to integrate it into React Native. how can i import or migrate or integrate it into React native? any help..........! i.e, if i run react-native run-android in command prompt my old Project have to be run. i have tried to import my entire project as a library even then it was running app folder only by default..... In Android folder instead of app folder my_Project have to be come......

Upvotes: 0

Views: 500

Answers (1)

Arunkumar
Arunkumar

Reputation: 1741

React Native is great when you are starting a new mobile app from scratch. However, it also works well for adding a single view or user flow to existing native applications. With a few steps, you can add new React Native based features, screens, views, etc.

The keys to integrating React Native components into your Android application are to:

1.Understand what React Native components you want to integrate.

2.Install react-native in your Android application root directory to create node_modules/ directory.

3.Create your actual React Native components in JavaScript.

4.Add com.facebook.react:react-native:+ and a maven pointing to the react-native binaries in node_modules/ to your build.gradle file.

5.Create a custom React Native specific Activity that creates a ReactRootView.

6.Start the React Native server and run your native application.

7.Optionally add more React Native components.

8.Debug.

9.Prepare for deployment.

10.Deploy and Profit!

More Detail refereed this link http://facebook.github.io/react-native/releases/0.42/docs/integration-with-existing-apps.html#integration-with-existing-apps

Upvotes: 3

Related Questions