G
G
gtir2020-05-08 12:14:07
React
gtir, 2020-05-08 12:14:07

What are subscriptions and unsubscriptions in React?

I watch a training video lesson and there the teacher says this sentence:

For example, you subscribed to DidMount, the component works, it works, and then you want the component to close so that you can unsubscribe. If I don’t unsubscribe, there will be a lot of subscriptions and garbage will be collected.


What is a subscription? Who is signing up for what? And why?

If you know an article where you can read about it, please reset it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
McBernar, 2020-05-08
@gtir

event listeners

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question