-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow using a pouchdb database per reducer. #28
base: master
Are you sure you want to change the base?
Allow using a pouchdb database per reducer. #28
Conversation
After configuring more than one reducer with pouchdb, the library was loading the same reducer state in the multiple reducers configured with redux-pouchdb
…ove performance. * Only gets the pouchDB document that matters to the persistent reducer. * Avoid setting reducer multiple times on initialization.
The actual current version was creating an event listener per persistent reducer what was causing problems on reducers population. The issue was due to have many events listeners as I was receiving the next warning in the console. "Warning: Possible EventEmitter memory leak detected. 11 destroyed listeners added. Use emitter.setMaxListeners() to increase limit" The last commit changes the code to use the same event listener to populate the multiple persistent reducers. |
Solves #27 .
After configuring more than one reducer with pouchdb, the library was loading the same reducer state in the multiple reducers configured with redux-pouchdb.