I have an react app in which my state is maintained by Context Provider and useReducer.
The state is an array. I have used state.arr.sort() function And it sorted the arr But how come it modified the state data when I haven't used the dispatch here??