0
votes

I am using react-native for iOS. My project has the following warning:

Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit<.

I do not use DeviceEventEmitter, and I use Keyboard component.

2

2 Answers

0
votes

Are you using Flux by any chance if not please provide the npm link to the component you are using.

0
votes

One of your Stores is Exceeding what EventEmitter is capable of. Just Do this.

var AppDispatcher = require('../Dispatcher/Dispatcher');
var EventEmitter = require('events').EventEmitter;
require('events').EventEmitter.prototype._maxListeners = 100;

/* By Default, a maximum of 10 listeners can be registered for any single event. more here: possible EventEmitter memory leak detected */