usehooks icon indicating copy to clipboard operation
usehooks copied to clipboard

Fix useObjectState type

Open QuixThe2nd opened this issue 4 months ago • 0 comments

The example provided doesn't work. The setter can take either the object or a function but the type only allows the object.

    setStats((s) => ({
      wins: s.wins + 1,
    }));

QuixThe2nd avatar Jun 01 '25 15:06 QuixThe2nd