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
importonChangefrom"on-change";import{Chess}from"chess.js";constchess=newChess();constwatchedChess=onChange(chess,()=>{console.log("change detected");});watchedChess.foo="bar";// change detectedwatchedChess.move({from: "e2",to: "e4"});// no change detected, even though this function mutates internal state
I suspect the issue is related to the internal chess state representation, which is not exposed to library consumers. Do you see any way/workaround to make this work?
The text was updated successfully, but these errors were encountered:
I'm using the popular https://github.com/jhlywa/chess.js but can't seem detect changes on mutations of the Chess object
Repro:
I suspect the issue is related to the internal chess state representation, which is not exposed to library consumers. Do you see any way/workaround to make this work?
The text was updated successfully, but these errors were encountered: