Listscroll event over states

listScrolled_state0_elList = async (event) => {
let isInView = this._state0_elList_endMarker.getBoundingClientRect().top < window.innerHeight;
let alreadyTriggered = this._state0_elList_scrollTrigger;
this._state0_elList_scrollTrigger = isInView;
if (!isInView || alreadyTriggered)
return;

if i set the event in a list on state 0 and if i change state to 1 then i have this error: