use-chrome-storage icon indicating copy to clipboard operation
use-chrome-storage copied to clipboard

Stored objects and arrays retrieved as string

Open cyucelen opened this issue 1 year ago • 2 comments

const [foo] = useChromeStorageLocal<MyObject>("foo", {});

This usage returns string instead of object.

cyucelen avatar Dec 20 '23 09:12 cyucelen

Such code returns an object for me.

onikienko avatar Dec 20 '23 20:12 onikienko

Most likely you have a string for your foo stored in chrome.storage.local

onikienko avatar Dec 20 '23 20:12 onikienko