React Hook, Hooks, React.
automatically merge and update the object..so we use …name above e => setName({…name,firstName : e.target.value: …name means copy every property from name object and overide firtsname field with different value //Example4: useState() as Array import React, { useState } from ‘react’ function