robinHooda

robinHooda

Deep copy vs shallow copy in Javascript

Sep 15, 20212 min read

Shallow copy Shallow copies duplicate as little as possible. A shallow copy of a collection is a copy of the collection structure, not the elements. With a shallow copy, two collections now share the individual elements. Deep copy Deep copies dupl...

Validating form input fields in React using react-hook-form and yup