I am trying to follow flux example for React, but var EventEmitter = require('events').EventEmitter;
can't load events module. Please help.
Thanks.
Call me crazy, but I think you want:
var EventEmitter = require('EventEmitter');
events is a node.js standard library module, @jaygarcia is right - here you would do require('EventEmitter') just like in RCTDeviceEventEmitter
@iceNuts - alternatively, you could include the events module from npm as I do here
events from npm working for react native. Thanks
Do I have to install EventEmitter module? It still does not find it. I tried but still I am having the same error. Maybe knowing at least that I could find some fresh information.
Most helpful comment
@iceNuts - alternatively, you could include the
eventsmodule from npm as I do here