@PeterQF yeah if somehow it shows error or the state gets modified by your local changes, you deep copy the state before you assign it to local.