I'm attempting to convert my React Native App into a node module. The issue I'm facing is that the module consists mainly of a NativeModule. Thus, my index.js file appears like this:
import { NativeModules } from 'react-native';
export default NativeModules.MyNativeClass;
After installing my package in the node_modules directory (using a local relative path in package.json) and importing it into my JS file, it always shows as undefined.
I experimented with exporting a test object using export default {test:'test'};
and that worked fine. So, is there a way to export the Native Module through node_modules?