3

I need to be able to see which packages I have linked with react-native link <dependency-name> to write some documentation for other devs on my team.

I didn't previously document every package I linked because I wanted to test packages before documenting that they were being used, so I didn't leave incorrect information in my documentation.

I have already run react-native link --help which doesn't list any way to do this. Is the only way to find linked libraries to look at the .gradle or podfile?

AJ Fick
  • 139
  • 1
  • 16

1 Answers1

2

Android can be found in 'Mainapplication.java' file.

    @Override
    public List<ReactPackage> createAdditionalReactPackages() {
        return Arrays.<ReactPackage>asList(
            new RNModule(), 
            ....            //your install native module list
        );
    }

In case of iOS, you can check in your podfile.

pod 'React', :path => '../node_modules/react-native'
...
pod 'RNModule', :path => '../node_modules/react-native-module'

And I don't recommend this method, but if you run 'react-natvie link', you will see that you link all the modules you added.

hong developer
  • 13,291
  • 4
  • 38
  • 68