Hi guys. I created a library that exports a bunch of components.
The index.js looks like this:
import React from 'react';
import { NativeModules } from 'react-native';
import ClickInfoTask from './app/components/clickInfoTask';
const { RNEduLibrary } = NativeModules;
module.exports = RNEduLibrary;
module.exports.ClickInfoTask = ClickInfoTask;
I installed this using npm install and react-native link and everything works fine on Android.
However, on iOS I got the following error:
null is not an object (evaluating 'module.exports.clickInfoTask = _clickInfoTask2.default')
I logged the imported ClickInfoTask and it's not null.
The ClickInfoTask class:
export default class ClickInfoTask extends Component { /* content of the class */ }
Hi guys. I created a library that exports a bunch of components. The index.js looks like this:
I installed this using
npm install
andreact-native link
and everything works fine on Android. However, on iOS I got the following error: null is not an object (evaluating 'module.exports.clickInfoTask = _clickInfoTask2.default')I logged the imported ClickInfoTask and it's not null.
The ClickInfoTask class:
export default class ClickInfoTask extends Component { /* content of the class */ }
(the project is here: github.com/pepavesely/EduLibrary
I'd much appreciate any help.
Regards, Josef Vesely