I asked a question here and got a perfect answer from @TaghiKhavari, which I am using and works well to add an item to an array and removes the stale state issue.
How