I want to store my data for my Chrome extension but I don't know how. I used the code below to store in my App component, but I get an error saying "Cannot find name 'chrome'". What do I need to add to my project so my code can use chrome?
useEffect(() => {
chrome.storage.sync.set({ key: value }, function () {
console.log("Value is set to " + value);
});
chrome.storage.sync.get(["key"], function (result) {
console.log("Value currently is " + result.key);
});
{
"manifest_version": 3,
"name": "Reminder-App",
"version": "0.1.0",
"description": "Reminder app for all your tasks",
"action": {
"default_popup": "index.html",
"default_title": "Reminder App"
},
"permissions": [
"storage"
]
}