Why we should not mutate state in react
In React, it is generally considered a best practice not to mutate the state variable directly. Instead, you should use the setState method provided by React to update the state. There are several reasons why mutating the state directly is discourage...
endeavourmonk.hashnode.dev3 min read