Sync state back to the client