September 2018
Intermediate to advanced
302 pages
7h 17m
English
You have probably heard this saying already. This sentiment applies to events that we dispatch and handle. Let's discuss some of the issues.
First of all, to listen to an event, you need to create an event listener. When should it be created? Usually, we create event listeners in a component with markup and register using onClick={this.someEventListener}. What if this event needs to cause a change to a completely different component? In this case, we need to lift the listener up the component tree into some container.
As we do this, we notice that we couple more and more components more tightly, passing increasing numbers of listeners down the prop chain. This is a nightmare ...
Read now
Unlock full access