It seems that state.change() can only be triggered when variables' id changes, such as int, str, etc. For a list, if only the elements in the list are modified, state.change() cannot be triggered unless a new copy of the list is copied and returned. However, copying the list every time can waste a lot of time and resources. Is there any way to add elements to the list and trigger state.change() without copying the list?
It seems that state.change() can only be triggered when variables' id changes, such as int, str, etc. For a list, if only the elements in the list are modified, state.change() cannot be triggered unless a new copy of the list is copied and returned. However, copying the list every time can waste a lot of time and resources. Is there any way to add elements to the list and trigger state.change() without copying the list?