You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been struggling with this issue. I believe that onTextChange is modifying an event it shouldn't. I found this message and the URL of the newRequest should never be set to the value it has.
To explain the architecture I have an itemStore that elmish is listening to as a subscriber. The itemStore keeps track of the selected item and the state of all items. I then have a sidebar and editor component. The sidebar on click opens up the item to be edited. Rapidly clicking between requests causes the url to get wrongly set in the state. For some reason rapidly clicking between requests causes onTextChange to fire. The url url = "cyan is cool" in the update is from a different item.
EDIT: I fixed this by adding a GUID to every item. This way I could easily check if the selected request, updated request and old request all align when attempting to update the item store. This solution is not ideal and still seems to break sometimes. It's very odd to me that the state is jumping around. I'd still very much like a way to do this that would essentially never bug out.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've been struggling with this issue. I believe that onTextChange is modifying an event it shouldn't. I found this message and the URL of the
newRequest
should never be set to the value it has.To explain the architecture I have an
itemStore
that elmish is listening to as a subscriber. TheitemStore
keeps track of the selected item and the state of all items. I then have a sidebar and editor component. The sidebar on click opens up the item to be edited. Rapidly clicking between requests causes theurl
to get wrongly set in the state. For some reason rapidly clicking between requests causesonTextChange
to fire. The urlurl = "cyan is cool"
in the update is from a different item.Editor view that is likely the issue
Editor update
Link to project: https://github.com/sixilli/funcman/tree/main/src/App
EDIT: I fixed this by adding a GUID to every item. This way I could easily check if the selected request, updated request and old request all align when attempting to update the item store. This solution is not ideal and still seems to break sometimes. It's very odd to me that the state is jumping around. I'd still very much like a way to do this that would essentially never bug out.
Beta Was this translation helpful? Give feedback.
All reactions