I have a side effect that attaches an event listener. The callback for this event listener need some state parts in order to trigger another side effect. These is a simplifi