React, calling backend services

Updating a post. I know that objects in JavaScript are referenced type. The handleUpdate method, takes in a post object, in that lecturer, Mosh directly modified the object. Since objects are reference type, modifying this object directly modifies the state. The state of a component should never be directly modified. I thought we were supposed to clone the object, and update the cloned copy and then pass the modified copy to the setState method to update the state