eventemitter Questions

5

Solved

I am trying to implement an EventEmitter/Subscriber relationship between two components in a react native class. I have seen referenced the following materials: React Native - Event Emitters by C...
Ossein asked 21/4, 2016 at 15:44

2

Solved

I am new to nodejs, currently learning it. I know nodejs is single-threaded, however I am wondering: if I use non-blocking method, for example, there are 20000 concurrent requests, and there is one...
Bunyabunya asked 17/10, 2014 at 18:21

4

Solved

I'm trying to use an event emitter with React useEffect and useState, but it always gets the initial state instead of the updated state. It works if I call the event handler directly, even with a s...
Pantomime asked 14/3, 2019 at 2:44

1

I've upgraded to the latest stable version of node (20.9.0) and now whenever I make a react app using npx create-react-app or using vite, it always shows the "possible eventEmitter memory leak...
Persephone asked 30/10, 2023 at 11:21

25

Solved

I am getting following warning: (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. Trace: at EventEmitter.<anonym...
Argentine asked 19/3, 2012 at 10:20

3

Is it possible to await till Angular EventEmitter emits, like it's possible to await ajax call (Angular 5 synchronous HTTP call)? What I want to do is: Having a Child component @Component({ tem...
Peony asked 7/6, 2020 at 19:16

2

So, I'm trying to understand code written by someone else and there's one thing I haven't figured out. Why would you use colon in an emit-name? Here's an example: this.$emit('update:compare', { k...
Khudari asked 30/4, 2020 at 13:29

12

It is so easy to use eventEmitter in node.js: var e = new EventEmitter(); e.on('happy', function(){console.log('good')}); e.emit('happy'); Any client side EventEmitter in browser native?
Auxochrome asked 23/8, 2017 at 6:12

6

Solved

I am trying to emit data from child to parent using the composition API I get the following warning. [Vue warn]: Extraneous non-emits event listeners (updatedcount) were passed to component but co...
Sherlocke asked 6/10, 2020 at 6:54

2

Solved

I was using EventEmitter and @Output in Angular services, today one of the colleagues mentioned it's not a good practice. I found this post mentioning it's a bad practice and it seems mostly is per...

4

Solved

I have a QueryList in a component. I am adding dynamically other components, that will be present in the QueryList, but if I subscribe to the changes of the QueryList, nothing happens. I thought it...
Shipe asked 3/4, 2017 at 11:28

1

I'm trying to implement an asynchronous worker with serverless lambda function with help of nestjs EventEmitter module. Handler is getting invoked on emitting an event, but the function gets closed...
Burnley asked 26/12, 2021 at 13:21

3

Solved

How to i return value from the an event listeners? See example below: const EventEmitter = require("events").EventEmitter; emitter = new EventEmitter(); emitter.on("sayHello", function(message)...
Pericarp asked 15/3, 2017 at 6:54

2

I've found the following example in a book I'm reading: function User() { EventEmitter.call(this); this.addUser = function (username, password) { // add the user // then emit an event this.em...
Affenpinscher asked 14/12, 2016 at 10:52

4

Solved

I am trying to design a scenario where on a particular event getting triggered, I wanted a few listeners to perform some task. Trying to also manage S.R.P of code, I want to have the listeners in a...
Sixpence asked 11/5, 2016 at 6:58

11

Solved

2 streams: Given readable streams stream1 and stream2, what's an idiomatic (concise) way to get a stream containing stream1 and stream2 concatenated? I cannot do stream1.pipe(outStream); stream2...
Sass asked 8/5, 2013 at 1:21

2

I'm trying to learn implementations of Observer Pattern. EventEmitter/EventTarget/EventDispatcher are one implementation of Observer Pattern but I wonder the differences between these three. Any ...
Ore asked 25/10, 2017 at 11:21

5

I have an EventEmitter and i am emitting an object as below: @Output() cellClick = new EventEmitter(); private _cellClicked(data: any){ let emitData: any = { colId: data.column.colId, rowId: da...
Sammons asked 19/4, 2017 at 3:8

3

Solved

I read a lot of things about EventEmitter. But I do not know in which case I need to use it in my Node.js application.
Storfer asked 10/8, 2016 at 18:40

1

Solved

It appears to be common practice to inherit from the EventEmitter if you want your class to support events. For example Google does it for Puppeteer, the WebSocket module does it, mongoose does it,...

2

I am learning new concept in node js that is event but i could not find where i should use this,I want any real scenario I could not find any article or blog on this. var events = require('events'...
Devoice asked 30/10, 2017 at 8:3

3

Solved

export declare class EventEmitter<T> extends Subject<T> { /** * Creates an instance of [EventEmitter], which depending on [isAsync], * delivers events synchronously or asynchronously...
Broadleaved asked 8/4, 2016 at 8:3

1

I'm working on a React Electron app, and I've been plagued with an event emitter memory leak in multiple areas of my app. I'm not extremely experienced with Node.js so forgive my amateur mistakes. ...
Primero asked 24/6, 2020 at 4:35

4

I am writing a web app where multiple listeners(Evcentsource SSE clients JS) will be connected to my server . what i want to do is Store SSE emitter per connected listener : can be done in memor...
Alper asked 7/11, 2016 at 10:20

1

Solved

Given a Typescript interface and a class extending Node.js EventEmitter, is it possible to define custom listeners that give typesafe check for the function arguments? Given the following exa...
Aiello asked 29/8, 2020 at 16:7

© 2022 - 2025 — McMap. All rights reserved.