I'm trying to import some native modules in my application.
In index.js
I'm trying to do:
import { AppRegistry, NativeModules } from 'react-native';
The, I want to use my my module:
const { NetworkListenerModule } = NativeModules;
However, NativeModules
is undefined
so does NetworkListenerModule
.
It does work in iOS, but I can't make it work on Android for some reason and I don't have any clue for what's wrong.