Aaron Greenwald
export function initModules() {
require('wix-one-app-bi').default.init();
require('native-app-wix-login');
require('wix-one-app-feed');
require('wix-inbox-mobile');
require('wix-hotels-mobile-app');
require('wix-store-merchant-app');
require('wix-one-app-pos');
require('wix-one-app-module-blog');
require('wix-one-bookings-manager');
require('wix-visitors-mobile-app');
require('wix-invoices-mobile');
require('wix-contact-card-mobile');
require('wix-mobile-media-manager');
require('wix-one-app-more');
require('wix-promote-app-module');
//clubs
require('wix-one-clubs-chat').default();
require('wix-one-bookings-member').default();
require('wix-one-invites').default();
require('wix-one-clubs-manager').default();
require('wix-one-clubs-feed').default();
require('wix-one-activities').default();
require('wix-one-app-notifications');
}
// expose
ModuleRegistry.notifyListeners('core.SessionUpdate', session);
// consume
const subscription = ModuleRegistry.addListener('core.SessionUpdate', function (session) {
// consumer handles updated session here
});
subscription.remove();
// expose (react-native-navigation screen), see note below
ModuleRegistry.registerComponentAsScreen('hotels.Dashboard', () => ComponentClass, store, Provider);
// expose (regular component / view)
ModuleRegistry.registerComponent('hotels.ReservationView', () => ComponentClass);
// consume
const ComponentClass = ModuleRegisry.component('hotels.Dashboard');
// expose
ModuleRegistry.registerMethod('inbox.getContactDetails', () => contactService.getContactDetails);
// consume
const contactDetails = await ModuleRegistry.invoke('inbox.getContactDetails', 'johnsmith@example.com');