react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

Documentation v2 addition

Open lschuft opened this issue 7 years ago • 3 comments

I think a bit of a warning is needed in the Installing docs at the MainApplication.java part, regarding any other already installed module that would need to be included in the provided code snippet.

The docs explicitly tell us to remove the ReactApplication implementation and replace it with a NavigationApplication one, providing a (compared to other blocks of code in the section) rather long block of code to copy and paste. Most of us newbies, myself included, would just do what the docs say, and move on, only to find out later that any other already installed package that deals with native code (React Native Push Notification, React Native Config, for example) would stop working, as the neccesary entries in getPackages() are now deleted.

protected List<ReactPackage> getPackages() {
    // Add additional packages you require here
    // No need to add RnnPackage and MainReactPackage
    return Arrays.<ReactPackage>asList(
        new ReactNativePushNotificationPackage(),
        new ReactNativeConfigPackage() 
    );
}

Other file modifications documented there, like the Gradle ones, are safe because they are mostly one liners that need to be added alongside other config. But this one in particular replaces the entire implementation of the app without any warning that modifications may be neccesary if other external packages are already present there.

Yes, I know there is a two line comment in there saying that any additional packages required need to be stated there, but as I said, there is no warn in the textual explanation of the step (and many of us do not remember how we installed an external module even days ago). I think it wouldn't hurt to add a small warn with explanation to avoid headaches.

lschuft avatar Jan 04 '19 06:01 lschuft

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

stale[bot] avatar Feb 04 '19 05:02 stale[bot]

The issue has been closed for inactivity.

stale[bot] avatar Feb 11 '19 06:02 stale[bot]

I have some questions with regards to this as well, is there any information about

https://wix.github.io/react-native-navigation/#/docs/app-launch

How to handle the destroyed javascript context / handle, for new comers it might be a bit of a daunting task.

Seamus-melco avatar Apr 03 '19 08:04 Seamus-melco