The Wayback Machine - https://web.archive.org/web/20220601160953/https://github.com/topics/hook
Skip to content
#

hook

Here are 1,224 public repositories matching this topic...

swr
goblinfactory
goblinfactory commented May 26, 2022

https://github.com/vercel/swr/blob/43f01571f0a985b5b62792059efe18835c508a94/examples/autocomplete-suggestions/pages/index.js#L21

I know this is only sample code, ... but I can see this suddenly ending up in lost of places verbatim, especially now that we have AI's writing most of our code :D (grin)

documentation good first issue
imbhargav5
imbhargav5 commented Mar 25, 2022

Is your feature request related to a problem? Please describe.
Some users require saving objects like ES6 maps which can't be JSON.stringified without a replacer function.

Describe the solution you'd like

We need replacer/ reviver functions optionally to be sent as arguments.

useLocalstorageState('key', value, {
  replacer: () => {},
  reviver: () => {} 
})

`
help wanted good first issue

Improve this page

Add a description, image, and links to the hook topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the hook topic, visit your repo's landing page and select "manage topics."

Learn more