Unregistering component callbacks from Stream(Rules)Store. #3378
Motivation and Context
Before this change, the StreamComponent was registering callbacks to be
After this change, there is now a way to unregister callbacks which is
Types of changes
edmundoa left a comment
Apart from the usage of
While testing the changes, I saw that we also register callbacks for
Before this change, the StreamComponent was registering callbacks to be notified when the Stream(Rules)Store state changes. Unfortunately, there was no way to unregister these callbacks, so after unmounting the component its callbacks were still called. After this change, there is now a way to unregister callbacks which is consumed in the componentWillUnmount function of the StreamComponent. Fixes #3374.
It was missing before, although used in at least one line of code. The reason why it worked before is because it was drawn it transitively through other libraries depending on it.